Visual identification method and system for automobile inhaul cable production
By constructing a color ring recognition structure tensor and combining it with multi-frame stability analysis and dynamic confidence strategy, the problems of insufficient color recognition accuracy and fault tolerance in the production of automotive cables in the existing technology are solved, and higher recognition accuracy and system stability are achieved.
Patent Information
- Application Number
- CN202510903010.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-21
AI Technical Summary
In current automotive cable production, visual recognition methods are highly dependent on color recognition accuracy, lack robustness, cannot effectively support dynamic management of model mapping rules, and lack fault tolerance mechanisms, resulting in decreased recognition accuracy and frequent misjudgments.
A color ring recognition structure tensor that integrates color distribution, position offset and boundary morphology is adopted. Through multi-frame stability analysis and dynamic confidence distance threshold generation strategy, a multi-attribute quantization model is constructed to achieve intelligent model matching and fault-tolerant processing of color ring structure.
It significantly improves the recognition accuracy and robustness in complex backgrounds, avoids misjudgments caused by changes in lighting, occlusion or jitter, and enhances the system's fault tolerance and recognition stability in high-speed production environments.
Smart Images

Figure SMS_9 
Figure SMS_10 
Figure SMS_11
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual recognition technology, in particular to a visual recognition method and system for automobile cable production. Background Art
[0002] In modern automobile manufacturing, cable-type control components (such as throttle control cables, brake control cables, and shift control cables) are widely used in vehicle systems. They are characterized by a wide variety, similar structures, and subtle appearance differences. To accommodate the rapid switching between different vehicle models, specifications, and process parameters, color coding or structural labeling is often used to distinguish different cable models. A common method is to attach a color ring structure with a specific color and shape to the end of the cable to identify its model, purpose, or process configuration. To automatically identify the cable model and trigger subsequent cutting, assembly, or process execution instructions, existing systems generally use industrial cameras to capture color ring images, use image processing algorithms to identify color information and structural features, and then compare them with the model database to determine the model.
[0003] However, the existing technology mainly has the following technical problems and limitations:
[0004] 1. High reliance on color recognition accuracy and insufficient robustness: Existing methods are mostly based on single-frame images and use simple RGB mean or HSV threshold matching. These methods are unable to cope with lighting interference, occlusion, or camera jitter in real scenes, resulting in a significant decrease in recognition accuracy.
[0005] 2. Inability to effectively support dynamic management of model mapping rules: Different cable models may have overlapping or similar color combinations. Without a structured mapping and judgment mechanism, misjudgment or selection errors are likely to occur, affecting subsequent process chain control.
[0006] 3. Lack of fault-tolerant processing mechanism for recognition failure: Once recognition failure or mismatch occurs, existing solutions usually directly interrupt the subsequent process, unable to determine whether it is accidental interference or insufficient information in the image itself, and lack multi-frame stability judgment and fault-tolerant strategy. Summary of the Invention
[0007] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a visual recognition method for automobile cable production.
[0008] To achieve the above objectives, the present invention provides a visual recognition method for automobile cable production, comprising:
[0009] S101: Acquire a cable image frame entering an image acquisition area, extract a ring structure region having a closed contour feature from the image frame, and generate a color ring recognition structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region;
[0010] S102: Mapping the color ring identification structure tensor to a preset model confirmation mapping map to obtain multiple model matching paths; and calculating a conditional unlocking linked list based on the parameter difference between each path and the target cable model;
[0011] S103: Execute startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception;
[0012] S104: Based on the matching anomaly result, subsequent image frames are continuously acquired within a set time window to generate a corresponding color ring identification structure tensor sequence, and a judgment is made based on the multi-frame stability of the structure tensor sequence, wherein the judgment result includes occasional interference and representation consistency.
[0013] Furthermore, generating a color ring recognition structure tensor corresponding to the image frame includes:
[0014] Perform multi-directional edge detection on the captured image frames, extract the boundary areas with closed contours, and mark them as candidate color ring structure sets;
[0015] According to the candidate color ring structure set, N coordinate points in each candidate color ring structure are collected, and a standardized morphological index coefficient of each candidate color ring structure is obtained by formulating and calculating based on the outline symmetry and spatial scale distribution;
[0016] The specific calculation formula is: Where Sym represents the standardized morphological index coefficient of the candidate color ring structure, x i and y i Represents the horizontal and vertical coordinates of the i-th sampling point, x c and y c Respectively represent the average value of the horizontal coordinate and the average value of the vertical coordinate of N sampling points;
[0017] Comparing the standardized morphological index coefficient with the preset standardized morphological index threshold;
[0018] If the standardized morphological index coefficient is greater than the preset standardized morphological index threshold, the candidate color ring structure is marked as "not meeting the requirements" and is removed from the candidate color ring structure set;
[0019] If the standardized morphological index coefficient is less than or equal to the preset standardized morphological index threshold, the candidate color ring structure is marked as "compliant" and is used as a valid color ring structure;
[0020] Based on the regional center point of the effective color ring structure as a reference, the color channel distribution is extracted to obtain a color statistical feature tensor.
[0021] Furthermore, the color channel distribution is extracted to obtain the color statistical feature tensor, including:
[0022] Taking the geometric center of each color ring structure as the reference, set the equal diameter sampling radius and construct the circular sampling area;
[0023] For all pixel points in the circular sampling area, extract the R / G / B three-channel pixel values respectively;
[0024] Based on the extracted pixel set, construct the RGB three-dimensional color mean vector and its covariance matrix;
[0025] Concatenate the color mean vector and the covariance matrix in a flattened manner to obtain the color statistical feature tensor;
[0026] The color statistical feature tensor is fused with the standardized morphological index coefficient to obtain a color ring recognition structure tensor.
[0027] Furthermore, a conditional unlocking linked list is calculated based on the parameter difference between each path and the target cable model, including:
[0028] Perform point-to-point calculations on the color statistics vector in the structure tensor and the model template to obtain the matching difference score, which is calculated as follows: Where, represents the matching difference score between the color ring recognition structure tensor and the m-th model template, Represents the jth vector in the color ring identification structure tensor, Represents the jth vector in the mth model template
[0029] comparing the match difference score to a dynamic confidence distance threshold;
[0030] If the matching difference score is greater than the dynamic confidence distance threshold, the model template is marked as "not matching" and skipped;
[0031] If the matching difference score is less than or equal to the dynamic confidence distance threshold, the model template is marked as "compliant" and the template number corresponding to the model template is included in the valid path set.
[0032] Furthermore, the generation logic of the dynamic confidence distance threshold is as follows:
[0033] Count the color distribution change rate of the current image frame in the past N frames;
[0034] Construct color volatility factors based on the rate of change;
[0035] Fusion maps path distribution density and performs normalized difference stretching;
[0036] The stretched difference value is weighted to generate a dynamic confidence threshold for the current frame.
[0037] Furthermore, based on the conditional unlocking linked list, a startup permission judgment is performed to obtain a matching result, including:
[0038] Access each structure of the conditional unlock list in turn and perform judgment.
[0039] If the control chain activation tolerance value in the control structure is greater than or equal to the matching difference score of the color ring structure, the color ring structure is more consistent with the model template, then it is marked as "matching successful", a start permission signal is sent to the device control unit, and the chain list judgment process is exited;
[0040] If the control chain activation tolerance value in the control structure is less than the matching difference score of the color ring structure, it is marked as "matching failure" and the next structure is accessed for judgment;
[0041] If the control chain activation tolerance value in all control structures is less than the matching difference score of the color ring structure, it is marked as "matching abnormality" and a blocking standby signal is sent to the device control unit.
[0042] Furthermore, based on the matching anomaly results, subsequent image frames are continuously collected within a set time window to generate a corresponding color ring identification structure tensor sequence, and judgment is made based on the multi-frame stability of the structure tensor sequence, including:
[0043] In the time window t+1 to t+k, K color ring image frames are obtained and the color mean vector of the central color ring area of each frame is extracted.
[0044] According to the color mean vector, a formula calculation is performed to obtain the average color fluctuation amplitude in the time series, and the calculation formula is: Where ΔC represents the color fluctuation amplitude, C t+k+1 represents the color mean vector of the t+k+1th frame, C t+k Represents the color mean vector of the t+kth frame;
[0045] Comparing the color fluctuation amplitude with the color fluctuation empirical threshold,
[0046] If the color fluctuation amplitude is greater than or equal to the color fluctuation empirical threshold, it is marked as "infrequent interference" and the process returns to step S101 to regenerate the color ring recognition structure tensor for matching.
[0047] If the color fluctuation amplitude is less than the color fluctuation empirical threshold, it is marked as "characterization consistent", the default blocking standby is executed, and the current image frame status is recorded and sent for manual verification.
[0048] In another aspect, the present invention provides a visual recognition system for automobile cable production, which is implemented based on the above-mentioned visual recognition method for automobile cable production and includes:
[0049] An image acquisition module is configured to acquire a cable image frame entering an image acquisition area, extract a ring structure region having a closed contour feature from the image frame, and generate a color ring identification structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region;
[0050] A model matching module is used to map the color ring identification structure tensor to a preset model confirmation mapping map to obtain multiple model matching paths; and calculate a conditional unlocking list based on the parameter difference between each path and the target cable model;
[0051] A control judgment module is used to perform startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception;
[0052] The fault-tolerant recheck module is used to continuously collect subsequent image frames within a set time window based on the matching abnormality results, generate a corresponding color ring identification structure tensor sequence, and make judgments based on the multi-frame stability of the structure tensor sequence. The judgment results include occasional interference and representation consistency.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention constructs a color ring recognition structure tensor that integrates color distribution, position offset and boundary morphology. By performing multi-attribute quantitative modeling of the color ring structure, it effectively enhances the recognition accuracy and robustness under conditions such as complex backgrounds, angle offsets, and lighting changes, and is significantly superior to traditional recognition strategies based on single-channel color mean or morphological templates.
[0055] The present invention introduces a dynamic confidence distance threshold generation strategy, which is based on the joint adjustment of the color fluctuation factor and the path distribution density within the time window. It can automatically adjust the judgment criteria according to the current production environment, thereby realizing a more flexible and intelligent model matching mechanism and avoiding false rejection or misjudgment caused by fixed thresholds.
[0056] Through a multi-frame stability analysis mechanism, the present invention can automatically determine whether a matching anomaly is an accidental interference or a real failure based on the color fluctuation amplitude within the time series, effectively avoiding false blocking caused by instantaneous occlusion or jitter, and improving the system's fault tolerance and recognition stability in high-speed production environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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.
[0058] Figure 1 Schematic diagram of the process of the present invention;
[0059] Figure 2 Schematic diagram of the structure of the system of the present invention. DETAILED DESCRIPTION
[0060] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only a 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 technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] See also Figure 1 The first embodiment of the present invention provides a visual recognition method for automobile cable production, comprising:
[0062] S101: Acquire a cable image frame entering an image acquisition area, extract a ring structure region having a closed contour feature from the image frame, and generate a color ring recognition structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region;
[0063] It should be understood that in order to automatically distinguish and enable different types of cables, high-precision recognition of the color ring structure on the cables is required. To this end, an image frame of the cable entering the image acquisition area is first acquired, and regions containing significant closed contour features are extracted from the image frame. Then, a color ring recognition structure tensor is constructed that can integrate multiple attributes such as color, spatial position, and boundary shape for subsequent model identification and control flow judgment.
[0064] It should be noted that the color ring identification structure tensor is a three-dimensional structure that integrates color distribution, spatial offset, and boundary parameters. It contains not only the color feature vector of each color ring, but also its position offset in the image frame (i.e., the coordinate deviation relative to the image center or reference axis) and the boundary morphological structure, which is used to enhance the robustness of template comparison in subsequent mapping images.
[0065] In implementation, generating a color ring identification structure tensor corresponding to the image frame includes:
[0066] Perform multi-directional edge detection on the captured image frames, extract the boundary areas with closed contours, and mark them as candidate color ring structure sets;
[0067] For example, assume that an image frame contains two sections of a cable and a color ring wrapped around the cable. Seven edge regions are extracted using a multi-directional edge detection algorithm (e.g., Canny+Sobel) and multi-directional gradients. Their closedness is then determined based on contour connectivity. If only one of these regions is a closed circular region, this region is identified as a candidate color ring structure.
[0068] According to the candidate color ring structure set, N coordinate points in each candidate color ring structure are collected, and a standardized morphological index coefficient of each candidate color ring structure is obtained by formulating and calculating based on the outline symmetry and spatial scale distribution;
[0069] The specific calculation formula is: Where Sym represents the standardized morphological index coefficient of the candidate color ring structure, x i and y i Represents the horizontal and vertical coordinates of the i-th sampling point, x c and y c Respectively represent the average value of the horizontal coordinate and the average value of the vertical coordinate of N sampling points;
[0070] It should be noted that the smaller the coefficient of the standardized morphological index is, the closer it is to the ideal symmetrical ring;
[0071] Comparing the standardized morphological index coefficient with the preset standardized morphological index threshold;
[0072] If the standardized morphological index coefficient is greater than the preset standardized morphological index threshold, the candidate color ring structure is marked as "not meeting the requirements" and is removed from the candidate color ring structure set;
[0073] If the standardized morphological index coefficient is less than or equal to the preset standardized morphological index threshold, the candidate color ring structure is marked as "compliant" and is used as a valid color ring structure;
[0074] It should be noted that the threshold of the equal-diameter normalized morphological index is obtained by technicians based on historical samples or training data, and will not be elaborated on here;
[0075] It should be understood that in actual image acquisition, there may be interference from factors such as metal reflectors on the cable, printed labels or tape marks, cluttered background (such as operator hands, equipment parts), and naturally formed "closed shape shadows" on the cable shell, causing them to be misjudged as closed areas during edge detection. Therefore, it is necessary to filter out false color rings in advance to effectively improve recognition accuracy, avoid unnecessary color vector calculations, and ensure stable and reliable input for subsequent tensor construction.
[0076] Based on the regional center point of the effective color ring structure as a reference, extracting the color channel distribution to obtain a color statistical feature tensor;
[0077] Among them, the color channel distribution is extracted to obtain the color statistical feature tensor, including:
[0078] Taking the geometric center of each color ring structure as the reference, set the equal diameter sampling radius and construct the circular sampling area;
[0079] For all pixel points in the circular sampling area, extract the R / G / B three-channel pixel values respectively;
[0080] It should be understood that R / G / B is the combination of the intensity values of the three additive light components of red, green, and blue for each pixel in the image frame. It is a three-primary color channel system constructed based on the additive color principle, and its value is an integer from 0 to 255.
[0081] Based on the extracted pixel set, construct the RGB three-dimensional color mean vector and its covariance matrix;
[0082] Concatenate the color mean vector and the covariance matrix in a flattened manner to obtain the color statistical feature tensor;
[0083] The color statistical feature tensor is integrated with the standardized morphological index coefficient to obtain a color ring recognition structure tensor;
[0084] For example, assume that a valid closed color ring structure is detected in a captured image frame, with the center coordinates of (x0, y0) and the preset sampling radius of r pixels. The extraction area is the circular color ring area with the center point as the circle center and a radius of r pixels.
[0085] Sampling is performed based on the color ring area to obtain N pixels, and the R / G / B three-channel pixel value of each pixel is extracted;
[0086] The three-dimensional mean vector is obtained by formulating the extracted pixel set, and the calculation formula is:
[0087]
[0088] Where μ R, μ G and μ B Respectively represent the mean of the R channel value, the mean of the G channel value and the mean of the B channel value in the three-dimensional mean vector, R i , G i and B i Represents the R channel value, G channel value and B channel value of the i-th pixel;
[0089] Based on the three-dimensional mean vector, a covariance matrix is constructed according to the extracted pixel set;
[0090] The covariance calculation formula is:
[0091]
[0092] Expand and calculate according to the covariance calculation formula to obtain the covariance matrix;
[0093]
[0094] Where Var(R), Var(G) and Var(B) represent the covariance of R channel value, the covariance of G channel value and the covariance of B channel value respectively, Cov(R,G), Cov(R,B), Cov(G,R), Cov(G,B), Cov(B,R) and Cov(B,G) represent the covariance between R channel value, G channel value and B channel value;
[0095] The color mean vector and the covariance matrix are concatenated in a flattened manner to obtain the color statistical feature tensor:
[0096] C=[μ R ,μ G ,μ B ,Var(R),Cov(R,G),...,Cov(B,R),Cov(B,G),Var(B)]
[0097] The color statistical feature tensor is fused with the standardized morphological index coefficient to obtain the color ring recognition structure tensor:
[0098] T=[μ R ,μ G ,μ B ,Var(R),Cov(R,G),...,Cov(B,R),Cov(B,G),Var(B),Sym];
[0099] S102: Mapping the color ring identification structure tensor to a preset model confirmation mapping map to obtain multiple model matching paths; and calculating a conditional unlocking linked list based on the parameter difference between each path and the target cable model;
[0100] Specifically, a conditional unlocking list is calculated based on the parameter difference between each path and the target cable model, including:
[0101] Perform point-to-point calculations on the color statistics vector in the structure tensor and the model template to obtain the matching difference score, which is calculated as follows: Where, represents the matching difference score between the color ring recognition structure tensor and the m-th model template, Represents the jth vector in the color ring identification structure tensor, Represents the jth vector in the mth model template;
[0102] It should be noted that the smaller the matching difference score, the closer it is to the target model;
[0103] It should also be noted that the model template is used to construct corresponding model structure templates for all supported cable models during the system initialization or first deployment phase of the production system;
[0104] For example, images of the finished cables of each model are selected to ensure standard color ring positions and balanced lighting. No less than 20 image frames are sampled for each model for averaging and statistics.
[0105] Execute step S101 for each image to extract the color ring recognition structure tensor, average the tensors extracted from all image frames under the model, and generate the final model template of the model;
[0106] comparing the match difference score to a dynamic confidence distance threshold;
[0107] If the matching difference score is greater than the dynamic confidence distance threshold, the model template is marked as "not matching" and skipped;
[0108] If the matching difference score is less than or equal to the dynamic confidence distance threshold, the model template is marked as "compliant" and the template number corresponding to the model template is included in the valid path set;
[0109] The generation logic of the dynamic confidence distance threshold is as follows:
[0110] Count the color distribution change rate of the current image frame in the past N frames;
[0111] Construct color volatility factors based on the rate of change;
[0112] Fusion maps path distribution density and performs normalized difference stretching;
[0113] The stretched difference value is weighted to generate a dynamic confidence threshold of the current frame;
[0114] An example explanation is to count the RGB three-dimensional color mean vector of the identified color ring of each frame image in the past T frame window of the current image frame And calculate the standard deviation σ of the three channels respectively in the time window {t-N+1,…,t} R , σ G , σ B , the calculation formula is:
[0115]
[0116] Where, Indicates the mean of the corresponding channel;
[0117] The above standard deviations are normalized and combined to construct the color fluctuation factor δ of this image frame μ , and its calculation formula is:
[0118]
[0119] It should be noted that δ μ The larger the value, the stronger the color fluctuation of the color ring within the time window, the worse the recognition stability, and the system automatically raises the judgment standard; if the fluctuation is small, the environment is considered stable and a lower matching score is allowed to pass;
[0120] The path distribution density of the fusion map is normalized and stretched by the distribution density index and the fluctuation factor to obtain the stretched difference value. The calculation formula is:
[0121] δ adj =α·δ μ +(1-α)·(1-ρ map ),
[0122] Where α∈[0,1] represents the fusion adjustment factor, ρ map Represents the distribution density index;
[0123] It should be noted that the mapping path distribution density is obtained by counting the number of color rings, the number of different color types, and the average adjacent color variance in each model path. The value range is [0.1, 5.0] and is used to express the "recognition redundancy" of the path in the color space.
[0124] Based on the benchmark confidence threshold θ0 and the dynamic fluctuation compensation term δ adj , calculate the dynamic threshold θ of the current frame dyn , and its calculation formula is:
[0125] θ dyn =θ0+λ·δ adj ,
[0126] Where λ represents the adjustment factor, which is set between 0 and 1;
[0127] It should be noted that the baseline confidence level is an empirical value determined by the system in long-term cable production tasks, after comparing and analyzing a large sample of different color ring templates with actual captured image frames, combined with the actual error tolerance range. It is usually set between 1.0 and 1.5. The purpose is to provide a basic threshold that can stably screen the optimal matching path under non-significant interference conditions.
[0128] It should be understood that when the cable color ring enters the image acquisition area, it is often affected by factors such as the cable's entry and exit angle, rotation posture, ambient lighting, and jitter noise, resulting in significant fluctuations in color distribution in the temporal dimension. Therefore, adopting a static threshold matching strategy will lead to insufficient recognition robustness or an increased false positive rate.
[0129] According to the valid path set, the material type, process parameters and control chain activation tolerance value corresponding to each valid path are extracted and encapsulated into a control structure;
[0130] It should be noted that the material type indicates the type of cable represented by the template (for example, "brake control cable", "throttle control cable", etc.), the process parameters indicate the molding process used, tension adjustment standard, sheath treatment type, etc., and the control chain activation tolerance value indicates the lower limit of confidence confirmation when the equipment is started, indicating the maximum allowable matching error of the current template;
[0131] For example, assuming the valid path number is 17, the corresponding model is "automatic transmission control cable", and its process and material configuration is "tension adjustment threshold 0.85 + double-layer nylon sheath", then its control structure is:
[0132]
[0133] Where, Indicates the control chain activation tolerance value of the template;
[0134] Based on the control structure and according to the preset priority rules, all control structures are sorted from small to large according to the matching difference scores, and a conditional unlocking list is constructed;
[0135] It should be noted that the priority sorting can be based on, but not limited to, the following strategies: the expected model of the current production task is prioritized, the frequency in the historical matching records, and scheduling policy constraints such as urgent work orders. Specific priorities can be dynamically adjusted according to on-site production needs;
[0136] To illustrate this, based on the preset priority rules, all control structures are sorted from smallest to largest according to their matching difference scores, and a conditional unlocking linked list is constructed. The linked list structure is as follows:
[0137]
[0138] S103: Execute startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception;
[0139] Specifically, based on the conditional unlocking linked list, a startup permission judgment is performed to obtain a matching result, including:
[0140] Access each structure of the conditional unlock list in turn and perform judgment.
[0141] If the control chain activation tolerance value in the control structure is greater than or equal to the matching difference score of the color ring structure, the color ring structure is more consistent with the model template, then it is marked as "matching successful", a start permission signal is sent to the device control unit, and the chain list judgment process is exited;
[0142] If the control chain activation tolerance value in the control structure is less than the matching difference score of the color ring structure, it is marked as "matching failure" and the next structure is accessed for judgment;
[0143] If the control chain activation tolerance value in all control structures is less than the matching difference score of the color ring structure, it is marked as "matching abnormality" and a blocking standby signal is sent to the device control unit;
[0144] S104: Based on the matching anomaly result, subsequent image frames are continuously acquired within a set time window to generate a corresponding color ring identification structure tensor sequence, and a judgment is made based on the multi-frame stability of the structure tensor sequence, wherein the judgment result includes occasional interference and representation consistency;
[0145] It should be understood that when the cable structure is in motion or obstructed, the color ring may be partially blocked, the cable rotation may cause angle deviation, or reflection / image blur may cause instantaneous recognition failure. If recognition failure is directly used as the final blocking basis, it may cause the system to respond too sensitively and mistakenly block actually legal cables, reducing system stability and industrial fault tolerance.
[0146] In implementation, based on the matching anomaly results, subsequent image frames are continuously acquired within a set time window to generate a corresponding color ring identification structure tensor sequence, and judgment is made based on the multi-frame stability of the structure tensor sequence, including:
[0147] In the time window t+1 to t+k, K color ring image frames are obtained and the color mean vector of the central color ring area of each frame is extracted.
[0148] According to the color mean vector, a formula calculation is performed to obtain the average color fluctuation amplitude in the time series, and the calculation formula is: Where ΔC represents the color fluctuation amplitude, C t+k+1 represents the color mean vector of the t+k+1th frame, C t+k Represents the color mean vector of the t+kth frame;
[0149] Comparing the color fluctuation amplitude with the color fluctuation empirical threshold,
[0150] If the color fluctuation amplitude is greater than or equal to the color fluctuation empirical threshold, it is marked as "infrequent interference" and the process returns to step S101 to regenerate the color ring recognition structure tensor for matching.
[0151] If the color fluctuation amplitude is less than the color fluctuation empirical threshold, it is marked as "characterization consistent", the default blocking standby is executed, and the current image frame status is recorded and sent for manual verification;
[0152] It should be understood that if the color stability index evaluation result is "stable", it means that the color information of the current frames is consistent with the previous ones. In this case, the previous failure may be a real matching failure rather than an accidental interference. At this time, the matching should not be retried. Only when the color fluctuations are large and unstable, it means that the color ring image may be in an interference state. At this time, it is reasonable to trigger the re-matching and recognition process.
[0153] See also Figure 2 Based on the same inventive concept, the second aspect of the present invention provides a visual recognition system for automobile cable production. For details not provided in this embodiment, please refer to the description of the relevant parts in Example 1. The system includes:
[0154] Image acquisition module 201 is used to acquire a cable image frame entering the image acquisition area, extract a ring structure region with closed contour features from the image frame, and generate a color ring identification structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region;
[0155] Model matching module 202 is used to map the color ring identification structure tensor to a preset model confirmation map to obtain multiple model matching paths; and calculate a conditional unlocking list based on the parameter difference between each path and the target cable model;
[0156] A control judgment module 203 is configured to perform a startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception;
[0157] The fault-tolerant recheck module 204 is used to continuously acquire subsequent image frames within a set time window based on the matching abnormality results, generate a corresponding color ring identification structure tensor sequence, and make a judgment based on the multi-frame stability of the structure tensor sequence, and the judgment result includes occasional interference and representation consistency.
[0158] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0159] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only one type. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0161] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0162] Some of the data in the above formula are calculated by removing the dimensions and taking their numerical values. The formula is a formula that is closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0163] The above embodiments are only used to illustrate the technical method 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 method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A visual recognition method for automobile cable production, characterized in that: include: S101: Acquire a cable image frame entering an image acquisition area, extract a ring structure region having a closed contour feature from the image frame, and generate a color ring recognition structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region; S102: Mapping the color ring identification structure tensor to a preset model confirmation mapping map to obtain multiple model matching paths; and calculating the conditional unlocking list based on the parameter difference between each path and the target cable model; S103: Execute startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception; S104: Based on the matching anomaly result, subsequent image frames are continuously acquired within a set time window to generate a corresponding color ring identification structure tensor sequence, and a judgment is made based on the multi-frame stability of the structure tensor sequence, wherein the judgment result includes occasional interference and representation consistency.
2. A visual recognition method for automobile cable production according to claim 1, characterized in that: Generate the color ring recognition structure tensor corresponding to the image frame, including: Perform multi-directional edge detection on the captured image frames, extract the boundary areas with closed contours, and mark them as candidate color ring structure sets; According to the candidate color ring structure set, N coordinate points in each candidate color ring structure are collected, and a standardized morphological index coefficient of each candidate color ring structure is obtained by formulating and calculating based on the outline symmetry and spatial scale distribution; The specific calculation formula is: Where Sym represents the standardized morphological index coefficient of the candidate color ring structure, x i and y i Represents the horizontal and vertical coordinates of the i-th sampling point, x c and y c Respectively represent the average value of the horizontal coordinate and the average value of the vertical coordinate of N sampling points; Comparing the standardized morphological index coefficient with the preset standardized morphological index threshold; If the standardized morphological index coefficient is greater than the preset standardized morphological index threshold, the candidate color ring structure is marked as "not meeting the requirements" and is removed from the candidate color ring structure set; If the standardized morphological index coefficient is less than or equal to the preset standardized morphological index threshold, the candidate color ring structure is marked as "compliant" and is used as a valid color ring structure; Based on the regional center point of the effective color ring structure as a reference, the color channel distribution is extracted to obtain a color statistical feature tensor.
3. A visual recognition method for automobile cable production according to claim 2, characterized in that: Extract the color channel distribution to obtain the color statistical feature tensor, including: Taking the geometric center of each color ring structure as the reference, set the equal diameter sampling radius and construct the circular sampling area; For all pixel points in the circular sampling area, extract the R / G / B three-channel pixel values respectively; Based on the extracted pixel set, construct the RGB three-dimensional color mean vector and its covariance matrix; Concatenate the color mean vector and the covariance matrix in a flattened manner to obtain the color statistical feature tensor; The color statistical feature tensor is fused with the standardized morphological index coefficient to obtain a color ring recognition structure tensor.
4. A visual recognition method for automobile cable production according to claim 3, characterized in that: Calculate the conditional unlocking list based on the parameter difference between each path and the cable target model, including: Perform point-to-point calculations on the color statistics vector in the structure tensor and the model template to obtain the matching difference score, which is calculated as follows: Where, represents the matching difference score between the color ring recognition structure tensor and the m-th model template, Represents the jth vector in the color ring identification structure tensor, Indicates that the j-th vector in the m-th model template compares the matching difference score with the dynamic confidence distance threshold; If the matching difference score is greater than the dynamic confidence distance threshold, the model template is marked as "not matching" and skipped; If the matching difference score is less than or equal to the dynamic confidence distance threshold, the model template is marked as "compliant" and the template number corresponding to the model template is included in the valid path set.
5. The visual recognition method for automobile cable production according to claim 4, characterized in that: The generation logic of the dynamic confidence distance threshold is as follows: Count the color distribution change rate of the current image frame in the past N frames; Construct color volatility factors based on the rate of change; Fusion maps path distribution density and performs normalized difference stretching; The stretched difference value is weighted to generate a dynamic confidence threshold for the current frame.
6. The visual recognition method for automobile cable production according to claim 5, characterized in that: Based on the conditional unlock list, the startup permission judgment is performed to obtain the matching results, including: Access each structure of the conditional unlock list in turn and perform judgment. If the control chain activation tolerance value in the control structure is greater than or equal to the matching difference score of the color ring structure, the color ring structure is more consistent with the model template, and it is marked as "match successful". A start permission signal is sent to the device control unit, and the chain list judgment process is exited; If the control chain activation tolerance value in the control structure is less than the matching difference score of the color ring structure, it is marked as "matching failure" and the next structure is accessed for judgment; If the control chain activation tolerance value of all control structures is less than the matching difference score of the color ring structure, it is marked as "matching abnormality" and a blocking standby signal is sent to the device control unit.
7. The visual recognition method for automobile cable production according to claim 6, characterized in that: Based on the matching anomaly results, subsequent image frames are continuously acquired within the set time window to generate the corresponding color ring identification structure tensor sequence, and judgment is made based on the multi-frame stability of the structure tensor sequence, including: In the time window t+1 to t+k, K color ring image frames are obtained and the color mean vector of the central color ring area of each frame is extracted. According to the color mean vector, a formula calculation is performed to obtain the average color fluctuation amplitude in the time series, and the calculation formula is: Where ΔC represents the color fluctuation amplitude, C t+k+1 represents the color mean vector of the t+k+1th frame, C t+k Represents the color mean vector of the t+kth frame; Comparing the color fluctuation amplitude with the color fluctuation empirical threshold, If the color fluctuation amplitude is greater than or equal to the color fluctuation empirical threshold, it is marked as "incidental interference" and the process returns to step S101 to regenerate the color ring recognition structure tensor for matching. If the color fluctuation amplitude is less than the color fluctuation empirical threshold, it is marked as "characterization consistent", the default blocking standby is executed, and the current image frame status is recorded and sent for manual verification.
8. A visual recognition system for automobile cable production, implemented based on a visual recognition method for automobile cable production according to any one of claims 1 to 7, characterized in that: include: An image acquisition module is configured to acquire a cable image frame entering an image acquisition area, extract a ring structure region having a closed contour feature from the image frame, and generate a color ring identification structure tensor corresponding to the image frame based on the color distribution, position offset, and boundary contour parameters of the region; A model matching module, configured to map the color ring identification structure tensor to a preset model confirmation mapping map to obtain multiple model matching paths; and calculating the conditional unlocking list based on the parameter difference between each path and the target cable model; A control judgment module is used to perform startup permission judgment based on the conditional unlocking linked list to obtain a matching result, wherein the matching result includes a matching success, a matching failure, and a matching exception; The fault-tolerant recheck module is used to continuously collect subsequent image frames within a set time window based on the matching abnormality results, generate a corresponding color ring identification structure tensor sequence, and make judgments based on the multi-frame stability of the structure tensor sequence. The judgment results include occasional interference and representation consistency.