Image recognition system for cable joint forming defect detection

By constructing image identity binding and interference feature modeling, the identification error caused by the mirror image interference in cable joint molding defect detection is solved, and accurate detection of cable joint molding defects is achieved.

CN120543555AActive Publication Date: 2025-08-26ZHEJIANG FUYANG TECH CO LTD

Patent Information

Application Number
CN202511040368.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-08-26
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

The existing cable connector molding defect detection system is difficult to accurately identify the target body under the interference of the mirror image sub-image, resulting in identification errors and lack of a mechanism for determining image identity consistency.

Method used

The image identity binding mechanism and interference feature modeling link are constructed, and the image identity vector is bound by the acquisition module, the interference modeling module predicts reflected interference, the feature fusion module analyzes structural differences, the screening module isolates non-ontological areas, and performs consistency verification with the defect identification module.

Benefits of technology

Identity verification of image sources is achieved, lens reflection or workpiece afterimage interference is eliminated, the accuracy and robustness of recognition are improved, and the target semantic consistency of the recognition network is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543555A_ABST
    Figure CN120543555A_ABST
Patent Text Reader

Abstract

The invention discloses an image recognition system for cable joint forming defect detection, and particularly relates to the field of image recognition, which comprises an acquisition module, an interference modeling module, a comparison module, a feature fusion module and a screening module, the acquisition module is used for acquiring a cable joint image, constructing a triple identifier for each frame of image and a corresponding time sequence identifier, a workpiece number and an acquisition equipment number, writing the triple identifier into an identifier area in image data, and generating an image identity vector; the interference modeling module is used for receiving the lens parameters, the illumination parameters and the edge structure data of the previous frame of image, and constructing an incident path model according to the lens parameters and the illumination parameters. By constructing an image identity binding mechanism and an interference feature modeling link and combining a structural difference analysis and ghosting removal process, a non-ontology region is identified and isolated in an image coordinate domain, so that the problem of target misjudgment caused by a mirror image secondary image in image acquisition is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and more particularly to an image recognition system for detecting molding defects of cable joints. Background Art

[0002] In current image detection systems for cable connector molding defects, high-speed acquisition equipment is generally in continuous operation, and the acquisition process of each frame of image is extremely dependent on a fixed light source, a standard shooting angle, and a uniform background structure.

[0003] However, in actual deployment environments, due to unstable surface cleanliness of industrial lenses, high reflectivity of the previous workpiece surface, or micro-internal reflection channels in the body structure, some image frames often contain image content that does not originate from the body. This content usually appears as a clear structural outline, smooth edges, and regular morphology, which can easily be misidentified by the system as a qualified area or key feature of the current joint.

[0004] More seriously, if such "mirror images" frequently appear in qualified samples, they will inevitably be embedded as normal feature templates during model training, resulting in a semantic mismatch between the training set and the actual defect distribution.

[0005] Traditional ROI cropping, boundary filtering, or background modeling methods are unable to effectively identify this type of image misalignment because the mirrored image itself is highly realistic and often appears in central areas or areas with dense features, which does not appear abnormal from a visual logic perspective. In addition, if the system does not establish an image source chain or an identity binding mechanism for time-series images, the detection logic cannot determine whether the object in the image belongs to the current workpiece to be inspected, making it impossible to trace its authenticity.

[0006] The problem with existing technologies is that the image recognition process lacks the ability to distinguish the identity consistency of the target entity. Under the influence of interference factors such as lens reflection and afterimage of the previous workpiece, it is very easy to use non-entity images as the basis for recognition, resulting in fundamental recognition errors. Summary of the Invention

[0007] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides an image recognition system for cable connector molding defect detection. By constructing an image identity binding mechanism and an interference feature modeling link, combined with structural difference analysis and ghosting removal processes, it is possible to identify and isolate non-body areas in the image coordinate domain, so as to solve the problem of target misjudgment caused by mirrored secondary images in image acquisition.

[0008] To achieve the above-mentioned object, the present invention provides the following technical solutions: an image recognition system for cable joint molding defect detection, comprising an acquisition module, an interference modeling module, a comparison module, a feature fusion module, and a screening module;

[0009] The acquisition module is used to acquire cable joint images, and construct a triplet identification for each frame of image with the corresponding time series identification, workpiece number, and acquisition device number, and write the triplet identification into the identification area in the image data to generate an image identity vector;

[0010] The interference modeling module is used to receive lens parameters, lighting parameters, and edge structure data of the previous frame image, build an incident path model based on the lens parameters and lighting parameters, analyze the reflection interference behavior in the previous frame image, calculate the light intensity offset matrix and structure superposition matrix in the image coordinate domain, and generate a reflection interference prediction map;

[0011] The comparison module is used to input the current frame image and the previous frame image, perform boundary line registration calculation and regional connectivity analysis in the image coordinate domain, solve the edge closure difference matrix, boundary deformation direction offset matrix and structural similarity matrix, and output the inter-frame structural difference map;

[0012] The feature fusion module is used to receive the boundary mutation area in the structure difference map, perform local grayscale gradient calculation, texture coding analysis and edge response extraction, load the reflection interference prediction map, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map;

[0013] The filtering module is used to input the identity afterimage determination map, parse the region consistency label, call the mask construction operator to remove the inconsistent regions, complete the region isolation in the image dimension, and output the body image sample set that retains the identity consistent region.

[0014] In a preferred embodiment, in the acquisition module, each frame of the cable joint image is bound to the corresponding time series identifier, workpiece number, and acquisition device number to construct a triplet identifier, and an identifier encoding function is called to encode the triplet identifier into structured identifier data;

[0015] The structured identification data is written into the identification area in the image data structure, maintaining the index association relationship with the image data body, and completing the generation of the image identity vector.

[0016] In a preferred embodiment, in the interference modeling module, an incident path model is constructed, and the definition Indicates the image coordinate point The incident angle value calculated at ;

[0017]

[0018] in Indicates the lens is at pixel position The corresponding normal vector; Indicates the pixel position The incident direction vector of the light at represents the dot product operator; represents the arccosine function; Indicates vector modulus calculation.

[0019] Model the reflection interference behavior and define: Indicates the pixel position Reflection interference response value at ;

[0020]

[0021] in Indicates the previous frame image at pixel position The rate of change of brightness gradient at ; is the cosine of the angle of incidence; Indicates the previous frame image at pixel position The edge response strength at ; It is a normalization function, and the output value range of the normalization function is limited to the interval [0, 1]; Indicates the time series index of the current frame image; Indicates the time series index of the previous frame.

[0022] In a preferred embodiment, in the interference modeling module, the light intensity offset value is calculated:

[0023]

[0024] in Indicates pixel position The light intensity offset value at ; Indicates the current frame image at pixel position The light intensity value; Indicates the previous frame image at pixel position The light intensity value; is the reflection attenuation coefficient;

[0025] Calculation of structural superposition response strength:

[0026]

[0027] in Indicates pixel position The structural superposition response intensity at ; Indicates the current frame image at pixel position The edge response value of Indicates the edge response value of the previous frame image at the same position; is the structural coincidence calculation function;

[0028] Output of reflection interference prediction map:

[0029]

[0030] in Represents the reflection interference prediction map at pixel position The output value of is the normalization function.

[0031] In a preferred embodiment, in the comparison module, the current frame image and the previous frame image are input, the boundary line information is extracted in the image coordinate domain, the boundary point coordinate sampling and coordinate domain normalization operations are performed, a one-to-one correspondence between the boundary line of the current frame and the boundary line of the previous frame is established, and a boundary line registration result is generated;

[0032] Based on the boundary line registration result, the boundary line coverage area is identified in the image coordinate domain, a pixel connectivity map of the area is constructed, and a connectivity labeling operator is called to label the connected areas to form a regional connectivity index map;

[0033] Based on the boundary line registration results, the closure offset between the boundary line of the current frame and the boundary line of the previous frame at the corresponding position is calculated to form an edge closure difference matrix; at the same time, the boundary line normal direction is differentially calculated in the coordinate domain to construct the boundary deformation direction offset matrix;

[0034] Under the constraint of the regional connectivity index map, the structural similarity value is calculated based on the texture gradient response map of the current frame image and the previous frame image, and a structural similarity matrix is ​​constructed. The coordinates are aligned and fused with the edge closure difference matrix and the boundary deformation direction offset matrix to output the inter-frame structural difference map.

[0035] In a preferred embodiment, in the feature fusion module, an inter-frame structural difference map is received, a boundary mutation region is identified in the image coordinate domain, a window template is constructed based on the position index of the boundary mutation region, a window cropping operation is performed on the image region corresponding to each position index, a boundary mutation image block set is generated, and the corresponding coordinate index is recorded;

[0036] For each image block in the boundary mutation image block set, three types of local feature calculations are performed in sequence. First, the grayscale image channel is called to calculate the gradient amplitude and gradient direction of each pixel in the image block to form a grayscale gradient map. Secondly, a local texture direction histogram is constructed based on the gradient direction distribution, and the histogram is directionally encoded to generate a texture coding map. Finally, the edge detection operator is used to perform edge intensity convolution calculation on the image block and output an edge response map. The grayscale gradient map, texture coding map and edge response map maintain consistent indexes in the image coordinate domain to form a regional image block feature group.

[0037] Load the reflection interference prediction map, extract the interference value block of the corresponding area in the image coordinate domain according to the coordinate index in the boundary mutation image block set, call the channel splicing operator to splice each set of grayscale gradient map, texture coding map, edge response map and interference value block in channel order, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map.

[0038] In a preferred embodiment, in the feature fusion module, the identity afterimage determination map is output from the regional feature fusion tensor map by taking each regional feature fusion tensor map as input and sending it to the identity afterimage determination subnetwork. The identity afterimage determination subnetwork includes multiple convolution layers, normalization layers and activation functions. The interference correlation features and structural difference features in the fusion tensor are extracted in the channel dimension, and the interference discrimination ability of the boundary response area is optimized through the spatial convolution operation. The pixel-by-pixel classification operation is performed in the output layer, so as to output the probability value of the afterimage existence for each coordinate position, and finally reconstruct the determination results of all pixel positions into the same value as the original Figure 1 A single-channel probability map of the same size is used as the identity afterimage judgment map.

[0039] In a preferred embodiment, it also includes a defect recognition module, which is used to construct a defect recognition network, input the ontology image sample set to the input channel of the defect recognition network, the recognition network includes a feature extraction backbone, identity vector filtering and defect classification output, loads the image identity vector generated by the acquisition module, performs identity consistency verification on the intermediate feature map corresponding to the ontology image sample set, and outputs a defect recognition label map.

[0040] In a preferred embodiment, in the defect recognition module, the construction of the defect recognition network includes sequentially building an input channel, a feature extraction backbone unit, an identity vector filtering unit and a defect classification output unit, wherein the input channel is used to receive the ontology image sample set, the feature extraction backbone unit includes multiple layers of convolutional layers, pooling layers and nonlinear activation units, and the feature extraction backbone unit is used to extract the intermediate feature map of the ontology image sample set; the identity vector filtering unit is used to load the image identity vector generated by the acquisition module, perform a vector consistency check operation on the intermediate feature map according to the image index, and mask the feature response area with inconsistent identity; the defect classification output unit is used to receive the filtered feature map, perform pixel-by-pixel classification operation, and output a defect recognition label map.

[0041] The technical effects and advantages of the present invention are as follows:

[0042] 1. This solution introduces an image identity vector embedding mechanism and constructs an image triplet binding strategy based on time series, workpiece number, and equipment number. This enables identity verification of the image source during the recognition process, avoiding image misjudgment caused by lens reflections or workpiece afterimages. This solves the root cause of recognition errors in current technologies, which is the lack of an identity consistency judgment mechanism for the target entity.

[0043] 2. By building an interference modeling module and combining lens parameters, lighting parameters, and the edge structure of the previous frame image, a reflection interference prediction map is generated. This can estimate the distribution of potential secondary image interference before image analysis, implement forward modeling of the causes of non-original images, and provide support for structural analysis and ghosting removal.

[0044] 3. During the image structure difference analysis process, boundary line registration and regional connectivity indexing mechanisms are used to construct a closed difference matrix and a boundary offset matrix, and the structural similarity value is calculated in conjunction with the texture response map to realize the identification of structural abnormal areas between frames and enhance the system's robust discrimination ability for potential pseudo-image structures.

[0045] 4. In the defect recognition stage, the identity vector generated by the acquisition module is loaded and the identity consistency filtering operation of the intermediate feature map is performed in the feature extraction backbone network to remove the interference features containing non-body areas and ensure the target semantic consistency of the recognition network training and reasoning process. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of the system module in the present invention.

[0047] Figure 2 Schematic diagram of the system module of the present invention. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0049] Refer to the instruction manual Figure 1-2 , an image recognition system for cable joint molding defect detection according to an embodiment of the present invention includes an acquisition module, an interference modeling module, a comparison module, a feature fusion module, and a screening module;

[0050] The acquisition module is used to acquire cable joint images, and construct a triplet identification for each frame of image with the corresponding time series identification, workpiece number, and acquisition device number, and write the triplet identification into the identification area in the image data to generate an image identity vector;

[0051] The interference modeling module is used to receive lens parameters, lighting parameters, and edge structure data of the previous frame image, build an incident path model based on the lens parameters and lighting parameters, analyze the reflection interference behavior in the previous frame image, calculate the light intensity offset matrix and structure superposition matrix in the image coordinate domain, and generate a reflection interference prediction map;

[0052] The comparison module is used to input the current frame image and the previous frame image, perform boundary line registration calculation and regional connectivity analysis in the image coordinate domain, solve the edge closure difference matrix, boundary deformation direction offset matrix and structural similarity matrix, and output the inter-frame structural difference map;

[0053] The feature fusion module is used to receive the boundary mutation area in the structure difference map, perform local grayscale gradient calculation, texture coding analysis and edge response extraction, load the reflection interference prediction map, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map;

[0054] The screening module is used to input the identity afterimage determination map, parse the regional consistency label, call the mask construction operator to eliminate the inconsistent area, complete the regional isolation in the image dimension, and output the ontological image sample set that retains the identity consistent area; wherein parsing the regional consistency label refers to performing a threshold judgment on the afterimage probability value of each pixel position in the identity afterimage determination map, marking the pixels above the consistency threshold as inconsistent labels, and marking the pixels below the threshold as consistent labels; calling the mask construction operator is to generate a binary mask map according to the consistent label in the image coordinate domain, assigning the position corresponding to the inconsistent label to zero, and assigning the position of the consistent label to one; completing the regional isolation in the image dimension is to multiply the mask map with the original image pixel by pixel, retaining only the image content corresponding to the consistent label, thereby outputting the ontological image sample set that retains the identity consistent area.

[0055] In the acquisition module, each frame of the cable joint image is bound to the corresponding time series identifier, workpiece number, and acquisition device number to construct a triplet identifier, and the identifier encoding function is called to encode the triplet identifier into structured identification data; the identifier encoding function includes four processing steps: sequential arrangement, field separation, bit length standardization, and joint hash calculation; in the sequential arrangement, the time series identifier, workpiece number, and acquisition device number are arranged in a predetermined order to form an original field sequence; secondly, a field separation operation is performed on each field, its basic coding unit is extracted and an independent index bit segment is allocated; then, the bit length of each index bit segment is standardized to make it consistent in the coding bit width; finally, the standardized index bit segment is input into the joint hash function to generate fixed-length structured identification data, which is written into the identification area of ​​the image data structure as the image identity vector;

[0056] The structured identification data is written into the identification area in the image data structure, maintaining the index association relationship with the image data body, and completing the generation of the image identity vector.

[0057] It should be noted that in the formula structure involved in this solution, dimensionless terms can serve as proportionality or structural adjustment factors. When combined with quantities with units, they only play a numerical scaling role and do not introduce new physical dimensions. Therefore, they will not change or confuse the overall unit system of expression. This combination of "dimensionless terms and units" can be understood as a composite structural expression commonly used in mathematical and physical modeling, conforming to the principle of dimensional consistency and having a clear physical interpretation basis.

[0058] Secondly, in the formula structure of this scheme, if multiple variables with different physical units are involved, including but not limited to time, mass or energy variables, their joint appearance is to express the collaborative modeling relationship of multiple physical mechanisms. Each variable can be formed into a unified structure through function mapping, ratio combination or normalization adjustment. The units and meanings are clear, and the overall expression conforms to the principle of dimensional consistency and the common formula of engineering modeling.

[0059] Any constants, weights, adjustment factors, threshold parameters, and proportional coefficients involved in this solution are all adjustable control parameters for different application environments. Their values ​​depend on the target device configuration, data input characteristics, and performance optimization goals. During the implementation phase, they are set within a reasonable range through model verification, performance constraints, or engineering calibration. Although these parameters do not have preset unique values, they have clear adjustment logic and calculation paths and are part of the deterministic setting process in engineering implementation. The purpose of such setting is to ensure that the solution is both universally adaptable, reproducible, and operable, without affecting its technical clarity and feasibility.

[0060] In the interference modeling module, construct the incident path model and define Indicates the image coordinate point The incident angle value calculated at (unit: radian); the incident angle value in the formula represents the angle between the lens optical axis direction and the incident light direction;

[0061]

[0062] in Indicates the lens is at pixel position The corresponding normal vector, including the solution obtained by the lens intrinsic parameter matrix and the optical axis transformation model, has a dimension of three-dimensional vector; Indicates the pixel position The light incident direction vector at is obtained by calculating the light parameter vector and the scene geometry mapping, and the dimension is a three-dimensional vector; represents the dot product operator; represents the arc cosine function, where the arc cosine function is used to calculate the radian value of the angle between two vectors; Indicates vector modulus calculation, which is used to normalize the direction vector.

[0063] Model the reflection interference behavior and define: Indicates the pixel position The reflected disturbance response value at (normalized predicted disturbance response);

[0064]

[0065] in Indicates the previous frame image at pixel position The rate of change of the brightness gradient at represents the change in the intensity of the reflection source; is the cosine of the incident angle, which represents the directional modulation factor of the reflection intensity; Indicates the previous frame image at pixel position The edge response intensity at represents the reflective ability of the boundary; is a normalization function, the output value range of the normalization function is limited to the interval [0, 1], which represents the regularization strength of the interference response. The normalization function includes the use of the Sigmoid function; Indicates the time series index of the current frame image; Indicates the time series index of the previous frame.

[0066] In the interference modeling module, calculate the light intensity offset value:

[0067]

[0068] in Indicates pixel position The light intensity offset value at the same coordinate position represents the change in light intensity between the current frame and the previous frame; Indicates the current frame image at pixel position The light intensity value; Indicates the previous frame image at pixel position The light intensity value; The reflection attenuation coefficient is calculated based on the lens surface reflectivity, ambient light absorptivity, and material refraction ratio. It can be obtained through manual experimental calibration or physical modeling. Its value reflects the degree of energy retention in the light reflection path of the previous frame. Its range is (0, 1). Values ​​closer to 1 indicate stronger residual reflections, while values ​​closer to 0 indicate almost complete attenuation of the reflection.

[0069] Calculation of structural superposition response strength:

[0070]

[0071] in Indicates pixel position The structural superposition response intensity at , which indicates the degree of overlap of the previous and next frame images in the edge structure; Indicates the current frame image at pixel position The edge response value of Indicates the edge response value of the previous frame image at the same position; The structural coincidence calculation function is defined based on the similarity of the edge values ​​of the two frames, including the use of local cross-correlation or absolute difference inverse function, and the introduction of The function of is to quantify the similarity of the edge response of the current frame and the previous frame at the same pixel position, and to judge the spatial overlap relationship of the two frames in the boundary structure. The structure superposition intensity value output by the function can be used as an auxiliary criterion for the interference propagation path, reflecting whether the afterimage interference occurs in the boundary consistency area, thereby improving the spatial accuracy and edge discrimination ability of the prediction image;

[0072] Output of reflection interference prediction map:

[0073]

[0074] in Represents the reflection interference prediction map at pixel position The output value of represents the final predicted disturbance response; is the normalization function, The normalization function in the formula is used to ensure that the output value is within the standard interference response space (including 0 to 1), to unify the multi-source dimensions, and to prevent dimensional problems in the calculation process. The normalization function in the formula includes using the Sigmoid function.

[0075] In the comparison module, the output of the inter-frame structural difference map includes: inputting the current frame image and the previous frame image, extracting boundary line information in the image coordinate domain, performing boundary point coordinate sampling and coordinate domain normalization operations, establishing a one-to-one correspondence between the current frame boundary line and the previous frame boundary line, and generating a boundary line registration result; wherein extracting the boundary line information in the image coordinate domain refers to identifying continuous pixel positions with significant grayscale or intensity changes in the image through an edge detection algorithm based on a pixel-level coordinate system, and generating a coordinate set representing the boundary line position; in addition, the one-to-one correspondence between the current frame boundary line and the previous frame boundary line refers to associating boundary points with similar positions and continuous structures in two time frames in the image coordinate domain one by one through a coordinate matching rule to form a registration mapping relationship between the boundary points between the frames;

[0076] Based on the boundary line registration result, the boundary line coverage area is identified in the image coordinate domain, a pixel connectivity map of the area is constructed, and a connectivity labeling operator is called to label the connected areas to form a regional connectivity index map; wherein identifying the boundary line coverage area in the image coordinate domain means extracting the surrounding pixels according to the set coordinate neighborhood range based on each pair of registration boundary points in the boundary line registration result, and collecting all the pixels in the neighborhood to form the boundary line coverage area; constructing the pixel connectivity map means performing connectivity judgment on adjacent pixels with the same registration boundary line identifier in the boundary line coverage area, establishing a connection relationship between pixels according to the four-neighborhood or eight-neighborhood rule, and forming a pixel connectivity map representing the spatial connection structure; calling the connectivity labeling operator to label the connected areas means using a depth-first traversal or breadth-first traversal method in the constructed pixel connectivity map, starting from each unvisited connected pixel, recursively traversing all pixels belonging to the same connected block according to the connectivity rule, and assigning a unique identification number to the connected block until all connected areas are labeled, thereby forming a regional connectivity index map;

[0077] Based on the boundary line registration results, the closing offset of the current frame boundary line and the previous frame boundary line at the corresponding position is calculated to form an edge closure difference matrix; at the same time, the boundary line normal direction is differentially calculated in the coordinate domain to construct a boundary deformation direction offset matrix; the closing offset refers to the Euclidean distance difference between each pair of boundary points in the registration correspondence relationship between the current frame boundary line and the previous frame boundary line, which is used to measure the change in the spatial closure degree of the boundary line; the edge closure difference matrix is ​​obtained by calculating the Euclidean distance difference for each pair of corresponding boundary points in the image coordinate domain according to the boundary line registration results, and The values ​​are mapped to the corresponding positions of the matrix according to the pixel positions, forming a two-dimensional real-valued matrix with coordinates as indexes and values ​​as closed offsets; wherein the difference operation is performed on the normal direction of the boundary line in the image coordinate domain, which means that based on each pair of corresponding boundary points in the boundary line registration result, the normal direction vectors of the current frame and the previous frame at their respective boundary points are first calculated, and then the angle calculation or vector difference operation is performed on the two normal vectors at each pair of registered boundary point positions to obtain the direction change, and the change is filled into the matrix according to the coordinate position of the boundary point, and a boundary deformation direction offset matrix with coordinate index and direction offset as value is constructed;

[0078] Under the constraints of the regional connectivity index map, the structural similarity value is calculated based on the texture gradient response map of the current frame image and the previous frame image, and a structural similarity matrix is ​​constructed. The coordinates are aligned and fused with the edge closure difference matrix and the boundary deformation direction offset matrix to output the inter-frame structural difference map.

[0079] The calculation of the structural similarity value is based on the texture gradient response map of the current frame image and the previous frame image. Under the constraints of the regional connectivity index map, according to the gradient direction and gradient amplitude of the corresponding pixel position in each connected region, a local gradient vector set is first constructed in each frame image. Then, the angle cosine similarity calculation is performed on the gradient vectors of each corresponding position, and a comprehensive similarity score is constructed based on the amplitude difference. Finally, the similarity score of each pixel position is mapped to the structural similarity matrix to measure the local consistency of the texture structure between frames.

[0080] The structural similarity matrix is ​​constructed by calculating the similarity of the texture gradient direction and amplitude of each pair of corresponding pixels in the regional connectivity index map, and filling the obtained similarity values ​​into the matrix according to the pixel coordinate position, thus generating a two-dimensional matrix with spatial position as index and similarity as value;

[0081] The coordinate alignment fusion is to ensure that the structural similarity matrix, edge closure difference matrix and boundary deformation direction offset matrix are numerically synthesized at the same image coordinate position, so as to uniformly express the degree of structural change at the same spatial position between frames and accurately output the inter-frame structural difference map.

[0082] In the feature fusion module, the inter-frame structural difference map is received, the boundary mutation area is identified in the image coordinate domain, a window template is constructed according to the position index of the boundary mutation area, the window cropping operation is performed on the image area corresponding to each position index, a boundary mutation image block set is generated, and the corresponding coordinate index is recorded; it should also be noted that the boundary mutation area is identified in the image coordinate domain by performing a pixel-by-pixel scanning operation on the structural difference map, extracting the pixel positions with difference intensity greater than the set threshold, and constructing a fixed-size candidate area window within the neighborhood of each high-difference pixel, and then calling the connected region extraction algorithm to merge the spatially continuous candidate windows into a boundary mutation area set, and assign a unique coordinate index to each area, thereby forming a boundary mutation area set with positioning and connectivity in the image coordinate domain;

[0083] For each image block in the boundary mutation image block set, three types of local feature calculations are performed in sequence. First, the grayscale image channel is called to calculate the gradient amplitude and gradient direction of each pixel in the image block to form a grayscale gradient map. Secondly, a local texture direction histogram is constructed based on the gradient direction distribution, and the histogram is directionally encoded to generate a texture coding map. Finally, the edge detection operator is used to perform edge intensity convolution calculation on the image block and output an edge response map. The grayscale gradient map, texture coding map and edge response map maintain consistent indexes in the image coordinate domain to form a regional image block feature group.

[0084] Load the reflection interference prediction map, extract the interference value block of the corresponding area in the image coordinate domain according to the coordinate index in the boundary mutation image block set, call the channel stitching operator to stitch each set of grayscale gradient map, texture coding map, edge response map and interference value block in channel order, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map; the channel stitching operator refers to stacking multiple single-channel images of corresponding positions according to the channel dimension while maintaining the consistency of spatial size, and generating a multi-channel tensor structure under the unified coordinate index.

[0085] In the feature fusion module, the identity afterimage determination map is output from the regional feature fusion tensor map. This is done by taking each regional feature fusion tensor map as input and sending it to the identity afterimage determination subnetwork. The identity afterimage determination subnetwork consists of multiple convolutional layers, normalization layers, and activation functions. The interference correlation features and structural difference features in the fusion tensor are extracted in the channel dimension, and the interference discrimination ability of the boundary response area is optimized through spatial convolution operations. Pixel-by-pixel classification operations are performed in the output layer, thereby outputting the probability value of afterimage existence for each coordinate position, and finally reconstructing the determination results of all pixel positions into the same value as the original Figure 1 A single-channel probability map of the same size is used as the identity afterimage judgment map.

[0086] It also includes a defect recognition module, which is used to construct a defect recognition network, input the ontology image sample set to the input channel of the defect recognition network, and the recognition network includes a feature extraction backbone, identity vector filtering and defect classification output. It loads the image identity vector generated by the acquisition module, performs identity consistency verification on the intermediate feature map corresponding to the ontology image sample set, and outputs a defect recognition label map.

[0087] In the defect recognition module, the construction of the defect recognition network includes sequentially building an input channel, a feature extraction backbone unit, an identity vector filtering unit and a defect classification output unit. The input channel is used to receive the ontology image sample set. The feature extraction backbone unit includes multiple layers of convolutional layers, pooling layers and nonlinear activation units. The feature extraction backbone unit is used to extract the intermediate feature map of the ontology image sample set; the identity vector filtering unit is used to load the image identity vector generated by the acquisition module, perform vector consistency verification operations on the intermediate feature map according to the image index, and mask the feature response areas with inconsistent identities; the defect classification output unit is used to receive the filtered feature map, perform pixel-by-pixel classification operations, and output the defect recognition label map.

[0088] It should be noted that the solution was developed to address the pain point of "mirror image" interference in cable connector image recognition, which seriously affects recognition accuracy. A systematic, full-chain processing mechanism was constructed, from image identity binding, interference modeling, structural difference analysis, to feature fusion and defect recognition, to achieve the goal of accurately identifying cable connector molding defects in dynamic industrial scenarios.

[0089] The solution begins with the acquisition module, which encodes and binds the image with a triplet of time series, workpiece number, and equipment number to form an image identity vector, which is embedded into the image data structure and provides an identity index foundation for subsequent modules. The interference modeling module constructs an incident path model and a reflection interference behavior model based on the edge structure data of the previous frame and the current lighting and lens parameters. It then outputs a normalized reflection interference prediction map to achieve forward prediction of interference behavior.

[0090] In the structural analysis stage, the comparison module constructs a connectivity index map through boundary line alignment and regional connectivity analysis, and solves the edge closure difference matrix, boundary deformation direction offset matrix and structural similarity matrix in the image coordinate domain, and generates an inter-frame structural difference map through coordinate alignment and fusion. The inter-frame structural difference map is used to indicate the area with significant structural changes in the time series image; Next, the feature fusion module constructs an image block set for the boundary mutation area identified in the structural difference map, calculates its grayscale gradient map, texture coding map and edge response map block by block, and extracts the interference value block at the corresponding position in the interference prediction map by index in the coordinate domain; The channel splicing operator is used to splice the above four types of images by channel to generate a fusion tensor map, which is sent to the identity afterimage determination subnetwork. Through multi-layer convolution and spatial classification operations, the identity afterimage determination map is output to accurately locate the mirror interference area;

[0091] To eliminate non-body regions, the screening module uses the identity afterimage determination map as a basis, divides consistency labels using afterimage probability thresholds, and constructs a binary mask map based on this. Region isolation is achieved by multiplying pixels in the image dimension, retaining only identity-consistent regions to form the body image sample set. This process ensures that the image used for subsequent defect recognition is entirely from the current workpiece, relatively avoiding contamination of the inspection results by reflection afterimages.

[0092] On this basis, the defect recognition module constructs a recognition network consisting of input channels, a feature extraction backbone, identity vector filtering, and defect classification output. The network's middle layer performs multi-layer feature extraction on the body image sample set and loads the image identity vector generated by the acquisition module. It then performs identity consistency filtering on the feature mapping layer, shielding residual identity-inconsistent areas. Finally, it outputs a pixel-by-pixel defect identification label map, enabling accurate classification and location of cable connector surface defects.

[0093] This solution uses image identity binding and structural afterimage elimination as its main logic due to the technical challenges of simulating mirror interference and the difficulty of traditional image features in verifying its authenticity. Without identity traceability, existing detection networks can easily embed pseudo-structures as positive samples into model training, resulting in a decrease in the generalization ability of defect models. By introducing image identity vectors throughout the data and feature streams, and combining multi-step structural similarity calculations with interference prediction to guide fusion judgment, this solution can achieve multi-dimensional analysis of inter-frame dynamic structures and extraction of body regions without interfering with the actual acquisition process. This solution is feasible and conducive to practical application in actual projects.

[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An image recognition system for cable joint molding defect detection, comprising an acquisition module, an interference modeling module, a comparison module, a feature fusion module, and a screening module, characterized in that: The acquisition module is used to acquire cable joint images, and construct a triplet identification for each frame of image with the corresponding time series identification, workpiece number, and acquisition device number, and write the triplet identification into the identification area in the image data to generate an image identity vector; The interference modeling module is used to receive lens parameters, lighting parameters, and edge structure data of the previous frame image, build an incident path model based on the lens parameters and lighting parameters, analyze the reflection interference behavior in the previous frame image, calculate the light intensity offset matrix and structure superposition matrix in the image coordinate domain, and generate a reflection interference prediction map; The comparison module is used to input the current frame image and the previous frame image, perform boundary line registration calculation and regional connectivity analysis in the image coordinate domain, solve the edge closure difference matrix, boundary deformation direction offset matrix and structural similarity matrix, and output the inter-frame structural difference map; The feature fusion module is used to receive the boundary mutation area in the structure difference map, perform local grayscale gradient calculation, texture coding analysis and edge response extraction, load the reflection interference prediction map, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map; The filtering module is used to input the identity afterimage determination map, parse the region consistency label, call the mask construction operator to remove the inconsistent regions, complete the region isolation in the image dimension, and output the body image sample set that retains the identity consistent region.

2. The image recognition system for detecting cable joint molding defects according to claim 1, characterized in that: In the acquisition module, each frame of the cable joint image is bound to the corresponding time series identifier, workpiece number, and acquisition device number to construct a triplet identifier, and an identifier encoding function is called to encode the triplet identifier into structured identifier data; The structured identification data is written into the identification area in the image data structure, maintaining the index association relationship with the image data body, and completing the generation of the image identity vector.

3. The image recognition system for detecting cable joint molding defects according to claim 2, characterized in that: In the interference modeling module, construct the incident path model and define Indicates the image coordinate point The incident angle value calculated at ; ; in Indicates the lens is at pixel position The corresponding normal vector; Indicates the pixel position The incident direction vector of the light at represents the dot product operator; represents the arccosine function; Indicates vector modulus calculation; Model the reflection interference behavior and define: Indicates the pixel position Reflection interference response value at ; ; in Indicates the previous frame image at pixel position The rate of change of brightness gradient at ; is the cosine of the angle of incidence; Indicates the previous frame image at pixel position The edge response strength at ; It is a normalization function, and the output value range of the normalization function is limited to the interval [0, 1]; Indicates the time series index of the current frame image; Indicates the time series index of the previous frame.

4. The image recognition system for detecting cable joint molding defects according to claim 3, characterized in that: In the interference modeling module, calculate the light intensity offset value: ; in Indicates pixel position The light intensity offset value at ; Indicates the current frame image at pixel position The light intensity value; Indicates the previous frame image at pixel position The light intensity value; is the reflection attenuation coefficient; Calculation of structural superposition response strength: ; in Indicates pixel position The structural superposition response intensity at ; Indicates the current frame image at pixel position The edge response value of Indicates the edge response value of the previous frame image at the same position; is the structural coincidence calculation function; Output of reflection interference prediction map: ; in Represents the reflection interference prediction map at pixel position The output value of is the normalization function.

5. The image recognition system for detecting cable joint molding defects according to claim 4, characterized in that: In the comparison module, the current frame image and the previous frame image are input, the boundary line information is extracted in the image coordinate domain, the boundary point coordinate sampling and coordinate domain normalization operations are performed, a one-to-one correspondence between the boundary line of the current frame and the boundary line of the previous frame is established, and the boundary line registration result is generated; Based on the boundary line registration result, the boundary line coverage area is identified in the image coordinate domain, a pixel connectivity map of the area is constructed, and a connectivity labeling operator is called to label the connected areas to form a regional connectivity index map; Based on the boundary line registration results, the closure offset between the boundary line of the current frame and the boundary line of the previous frame at the corresponding position is calculated to form an edge closure difference matrix; at the same time, the boundary line normal direction is differentially calculated in the coordinate domain to construct the boundary deformation direction offset matrix; Under the constraint of the regional connectivity index map, the structural similarity value is calculated based on the texture gradient response map of the current frame image and the previous frame image, and a structural similarity matrix is ​​constructed. The coordinates are aligned and fused with the edge closure difference matrix and the boundary deformation direction offset matrix to output the inter-frame structural difference map.

6. The image recognition system for detecting cable joint molding defects according to claim 5, characterized in that: In the feature fusion module, the inter-frame structural difference map is received, the boundary mutation region is identified in the image coordinate domain, a window template is constructed based on the position index of the boundary mutation region, and a window cropping operation is performed on the image region corresponding to each position index to generate a set of boundary mutation image blocks and record the corresponding coordinate index; For each image block in the boundary mutation image block set, three types of local feature calculations are performed in sequence. First, the grayscale image channel is called to calculate the gradient amplitude and gradient direction of each pixel in the image block to form a grayscale gradient map. Secondly, a local texture direction histogram is constructed based on the gradient direction distribution, and the histogram is directionally encoded to generate a texture coding map. Finally, the edge detection operator is used to perform edge intensity convolution calculation on the image block and output an edge response map. The grayscale gradient map, texture coding map and edge response map maintain consistent indexes in the image coordinate domain to form a regional image block feature group. Load the reflection interference prediction map, extract the interference value block of the corresponding area in the image coordinate domain according to the coordinate index in the boundary mutation image block set, call the channel splicing operator to splice each set of grayscale gradient map, texture coding map, edge response map and interference value block in channel order, jointly generate the regional feature fusion tensor map, and output the identity afterimage determination map.

7. The image recognition system for detecting cable joint molding defects according to claim 6, characterized in that: In the feature fusion module, the identity afterimage determination map is output from the regional feature fusion tensor map by taking each regional feature fusion tensor map as input and sending it to the identity afterimage determination subnetwork. The identity afterimage determination subnetwork consists of multiple convolutional layers, normalization layers and activation functions. It extracts the interference correlation features and structural difference features in the fusion tensor in the channel dimension, and then optimizes the interference discrimination ability of the boundary response area through spatial convolution operation. It performs pixel-by-pixel classification operation in the output layer, thereby outputting the probability value of the afterimage existence for each coordinate position. Finally, the determination results of all pixel positions are reconstructed into a single-channel probability map of the same size as the original image as the identity afterimage determination map.

8. The image recognition system for detecting cable joint molding defects according to claim 7, characterized in that: It also includes a defect recognition module, which is used to construct a defect recognition network, input the ontology image sample set to the input channel of the defect recognition network, and the recognition network includes a feature extraction backbone, identity vector filtering and defect classification output. It loads the image identity vector generated by the acquisition module, performs identity consistency verification on the intermediate feature map corresponding to the ontology image sample set, and outputs a defect recognition label map.

9. The image recognition system for detecting cable joint molding defects according to claim 8, characterized in that: In the defect recognition module, the construction of the defect recognition network includes sequentially building an input channel, a feature extraction backbone unit, an identity vector filtering unit, and a defect classification output unit. The input channel is used to receive the body image sample set. The feature extraction backbone unit includes multiple convolutional layers, pooling layers, and nonlinear activation units. The feature extraction backbone unit is used to extract the intermediate feature map of the body image sample set. The identity vector filtering unit is used to load the image identity vector generated by the acquisition module, perform vector consistency check operations on the intermediate feature map according to the image index, and mask the feature response areas with inconsistent identities; The defect classification output unit is used to receive the filtered feature map, perform pixel-by-pixel classification operations, and output a defect identification label map.

Citation Information

Patent Citations

  • High-voltage cable joint internal defect detection method based on X-ray imaging technology

    CN111795982A

  • Reflection interference removing method and system based on reflection area detection and edge attention

    CN119206452A

  • Battery FPC defect detection method and system based on laser imaging

    CN120102599A

  • Deep learning based robot target recognition and motion detection method, storage medium and apparatus

    US11763485B1

  • Illumination field non-uniformity detection system, detection method, correction method, and device

    US20240265500A1

Cited By

  • Dinov3 and SAM-based few-sample industrial defect target detection method and system

    CN120953269A

  • Target identification system based on multi-modal image analysis

    CN121392435A