Single-core tinned copper alloy wire quality inspection method and equipment
Through image analysis technology, the shape, color consistency and texture characteristics of the curved area of the single-core tin-plated copper alloy wire are detected, which solves the problems of inefficient quality detection efficiency and inaccurate results in the prior art, and achieves more efficient and accurate quality control.
Patent Information
- Application Number
- CN202510150093.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-11
AI Technical Summary
In the prior art, the quality detection efficiency of single-core tin-plated copper alloy wires is low, and the detection results are inaccurate, which is limited by the subjectivity and inconsistency of manual visual inspection.
By obtaining the image of single-core tin-plated copper alloy wires, determining their shape characteristics and shape areas, analyzing the color consistency of the shape areas, and detecting texture characteristics in the curved area to determine the quality detection results.
Improve the accuracy and efficiency of quality inspection, and can promptly detect deviations or defects in shape, color and texture, ensuring that the geometric dimensions and appearance quality of the product meet the standards.
Smart Images

Figure CN119619153B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of copper alloy wire quality detection, and in particular, relates to a single-core tinned copper alloy wire quality detection method and equipment. Background Art
[0002] Single-core tinned copper alloy wire is a wire with a layer of metallic tin plated on the surface of the copper alloy wire. It combines the good conductivity of copper alloy with the corrosion resistance and oxidation resistance of tin, thus having many advantages such as high conductivity, good oxidation resistance and corrosion resistance.
[0003] In the prior art, the quality inspection of single-core tinned copper alloy wire usually relies on traditional manual visual inspection methods. This method is not only inefficient and difficult to adapt to the rapid production rhythm, but also limited by the experience and skill level of the inspectors, which may lead to subjectivity and inconsistency in the inspection results. Therefore, the current quality inspection of single-core tinned copper alloy wire has the problems of low efficiency and inaccurate inspection results. Summary of the invention
[0004] The embodiments of the present application provide a single-core tinned copper alloy wire quality inspection method and equipment, which can solve the problems of low efficiency and inaccurate inspection results for the quality inspection of single-core tinned copper alloy wire.
[0005] In a first aspect, an embodiment of the present application provides a single-core tinned copper alloy wire quality detection method, comprising:
[0006] Acquire a first image of a single-core tinned copper alloy wire; wherein the first image is obtained by photographing the single-core tinned copper alloy wire with a camera;
[0007] Determine the shape feature and shape area of the single-core tinned copper alloy wire based on the first image; wherein the shape feature includes the length and width of the single-core tinned copper alloy wire, and the shape area is the two-dimensional space range occupied by the single-core tinned copper alloy wire in the first image;
[0008] In the case where the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature, determining whether the color of the shape area is consistent based on the first image;
[0009] determining a bending area of the single-core tinned copper alloy wire according to the shape area;
[0010] In a case where it is determined based on the first image that the color of the shape area is consistent, determining the texture feature of the single-core tinned copper alloy wire in the bending area based on the bending area of the single-core tinned copper alloy wire;
[0011] The quality inspection result of the single-core tinned copper alloy wire is determined based on the texture characteristics of the single-core tinned copper alloy wire in the bending area.
[0012] The above technical solutions in the embodiments of the present application have at least the following technical effects:
[0013] The single-core tin-plated copper alloy wire quality inspection method provided in the embodiment of the present application determines the shape characteristics and shape area of the single-core tin-plated copper alloy wire by acquiring a first image of the single-core tin-plated copper alloy wire, which is conducive to timely discovering deviations or defects in shape and ensuring that the geometric dimensions of the product meet the production standards; when the shape of the single-core tin-plated copper alloy wire is determined to be qualified based on the shape characteristics, the color consistency of the shape area is determined based on the first image. By determining the color consistency of the shape area, it is conducive to quickly identifying areas with uneven colors or defects, thereby facilitating improving the overall appearance and reliability of the product; the bending area of the single-core tin-plated copper alloy wire is determined based on the shape area; when the color consistency of the shape area is determined based on the first image, the quality inspection result of the single-core tin-plated copper alloy wire is determined based on the texture characteristics of the single-core tin-plated copper alloy wire in the bending area, and focusing on the inspection of the bending area (the area where defects are most likely to occur) is conducive to reducing the inspection time and improving the overall inspection efficiency. Therefore, the single-core tin-plated copper alloy wire quality inspection method provided in the embodiment of the present application is not only conducive to improving the accuracy and efficiency of quality inspection through a comprehensive and progressive inspection process of the shape, color consistency and texture characteristics of the single-core tin-plated copper alloy wire, but also conducive to timely discovering potential quality problems, thereby providing strong support for product quality control and continuous improvement.
[0014] In a possible implementation manner of the first aspect, determining the shape feature and shape area of the single-core tinned copper alloy wire based on the first image includes:
[0015] Performing edge detection on the first image to obtain an edge detection result;
[0016] Extracting the outline of the single-core tinned copper alloy wire according to the edge detection result;
[0017] determining the shape region based on the contour;
[0018] The shape feature is extracted from the contour.
[0019] In a possible implementation manner of the first aspect, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, before determining whether the color of the shape area is consistent based on the first image, the method further includes:
[0020] Determining whether the shape feature is within a standard range;
[0021] If the shape feature is not within the standard range, it is determined that the quality test result of the single-core tinned copper alloy wire is unqualified;
[0022] If the shape feature is within the standard range, it is determined that the shape of the single-core tinned copper alloy wire is qualified.
[0023] In a possible implementation manner of the first aspect, when determining that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, determining whether the color of the shape area is consistent based on the first image includes:
[0024] When it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, counting the proportion of pixels with the same color in the shape area;
[0025] Determining whether the ratio reaches a first threshold;
[0026] If the ratio reaches the first threshold, determining that the colors of the shape areas are consistent;
[0027] If the ratio does not reach the first threshold, it is determined that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0028] In a possible implementation manner of the first aspect, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, counting the proportion of pixels with consistent colors in the shape area includes:
[0029] When it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, traverse all pixel points in the shape area and extract the HSV color value of each pixel point;
[0030] Calculate the median of the HSV color values of all pixels in the shape area;
[0031] Compare the difference between the HSV color value of each pixel and the median;
[0032] determining whether the difference is within a tolerance range;
[0033] If the difference is within the tolerance range, the pixel is recorded as a pixel with the same color;
[0034] If the difference is not within the tolerance range, the pixel is not recorded as a pixel with the same color;
[0035] Calculate the ratio of pixels with the same color to all the pixels.
[0036] In a possible implementation manner of the first aspect, determining the bending area of the single-core tinned copper alloy wire according to the shape area includes:
[0037] Determining a center line of the shape area according to the shape area; wherein the center line is used to reflect the geometric shape of the single-core tinned copper alloy wire;
[0038] calculating the curvature of each point on the center line;
[0039] The starting position and the end position of each curved subdomain are determined according to the curvature of each point on the center line; wherein the curved subdomain is an area along the length direction of the single-core tinned copper alloy wire, in the shape area, where the curvature of each point on the center line is greater than the curvature threshold, and any two curved subdomains do not overlap each other;
[0040] The bending area of the single-core tinned copper alloy wire is determined according to the starting position and the ending position of each bending sub-domain.
[0041] In a possible implementation manner of the first aspect, when determining based on the first image that the color of the shape area is consistent, determining the texture feature of the single-core tinned copper alloy wire in the bending area based on the bending area of the single-core tinned copper alloy wire includes:
[0042] When it is determined based on the first image that the color of the shape area is consistent, performing LBP calculation on the bending area of the single-core tinned copper alloy wire to obtain the LBP value of each pixel point of the bending area;
[0043] Determine the LBP feature vector of each sub-region in the curved region based on the LBP value of each pixel point; wherein the sub-region is a region of the same preset area divided in sequence from the curved region;
[0044] The LBP feature vector is determined as the texture feature.
[0045] In a possible implementation manner of the first aspect, determining a quality inspection result of the single-core tinned copper alloy wire based on a texture feature of the single-core tinned copper alloy wire in the bending region includes:
[0046] Determine the difference between each sub-region and all adjacent sub-regions in the curved region according to the texture feature; wherein the difference is used to reflect the difference between the texture features of each sub-region and all adjacent sub-regions in the curved region;
[0047] If the difference between a sub-region and an adjacent sub-region exceeds a second threshold, and the proportion of adjacent sub-regions exceeding the second threshold reaches a preset ratio, the sub-region is determined as a defective region;
[0048] Judging whether the single-core tinned copper alloy wire has defects according to the areas of all defective regions;
[0049] If the single-core tinned copper alloy wire has defects, determining that the quality inspection result of the single-core tinned copper alloy wire is unqualified;
[0050] If the single-core tinned copper alloy wire has no defects, it is determined that the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0051] In a possible implementation manner of the first aspect, determining the difference between each sub-region and all adjacent sub-regions in the curved region according to the texture feature includes:
[0052] Calculate the difference between the LBP feature vectors of each sub-region and all adjacent sub-regions in the curved region according to the texture feature;
[0053] The difference values are normalized to obtain the difference between each sub-region and all adjacent sub-regions in the curved region.
[0054] In a possible implementation manner of the first aspect, after determining the difference between each sub-region and all adjacent sub-regions according to the texture feature, the method further includes:
[0055] If there is no sub-region whose difference with the adjacent sub-region exceeds the second threshold, or the proportion of the number of adjacent sub-regions exceeding the second threshold does not reach the preset proportion, it is determined that the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0056] In a second aspect, an embodiment of the present application provides a single-core tinned copper alloy wire quality detection device, comprising:
[0057] An acquisition module, used to acquire a first image of a single-core tinned copper alloy wire; wherein the first image is obtained by photographing the single-core tinned copper alloy wire with a camera;
[0058] A shape module, configured to determine a shape feature and a shape region of the single-core tinned copper alloy wire based on the first image; wherein the shape feature includes a length and a width of the single-core tinned copper alloy wire in the first image, and the shape region is a two-dimensional space range occupied by the single-core tinned copper alloy wire in the first image;
[0059] a color module, for determining whether the color of the shape area is consistent based on the first image when the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature;
[0060] A bending area module, used to determine the bending area of the single-core tinned copper alloy wire according to the shape area;
[0061] a texture feature module, configured to determine a texture feature of the single-core tinned copper alloy wire in the bending region based on the bending region of the single-core tinned copper alloy wire, when it is determined based on the first image that the color of the shape region is consistent;
[0062] A quality detection module is used to determine the quality detection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in the bending area.
[0063] In a third aspect, an embodiment of the present application provides a single-core tinned copper alloy wire quality inspection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements a method as described in any one of the first aspects above.
[0064] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects above is implemented.
[0065] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a single-core tinned copper alloy wire quality inspection device, the single-core tinned copper alloy wire quality inspection device executes any of the methods described in the first aspect above.
[0066] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0068] Figure 1 It is a schematic flow chart of a single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0069] Figure 2 It is a schematic diagram of the implementation process of step S200 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0070] Figure 3It is a schematic diagram of the implementation process before step S300 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0071] Figure 4 It is a schematic diagram of the implementation process of step S300 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0072] Figure 5 It is a schematic diagram of the implementation process of step S310 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0073] Figure 6 It is a schematic diagram of the implementation process of step S400 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0074] Figure 7 It is a schematic diagram of the implementation process of step S500 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0075] Figure 8 It is a schematic diagram of the implementation process of step S600 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0076] Fig. 9 It is a schematic diagram of the implementation process of step S610 in the single-core tinned copper alloy wire quality detection method provided in one embodiment of the present application;
[0077] Fig.10 It is a structural schematic diagram of a single-core tinned copper alloy wire quality detection device provided in an embodiment of the present application;
[0078] Fig.11 It is a structural schematic diagram of a single-core tinned copper alloy wire quality inspection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0080] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0081] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0082] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0083] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0084] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0085] In the related art, the quality inspection of single-core tinned copper alloy wire usually relies on traditional manual visual inspection methods. This method is not only inefficient and difficult to adapt to the rapid production rhythm, but also limited by the experience and skill level of the inspectors, which may lead to subjectivity and inconsistency in the inspection results. Therefore, the current quality inspection of single-core tinned copper alloy wire has the problems of low efficiency and inaccurate inspection results.
[0086] To solve the above problems, the embodiment of the present application provides a single-core tinned copper alloy wire quality detection method and device. In the method, by obtaining the first image of the single-core tinned copper alloy wire, the shape characteristics and shape area of the single-core tinned copper alloy wire are determined, which is conducive to timely discovering the deviation or defect in the shape and ensuring that the geometric dimensions of the product meet the production standards; when the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape characteristics, the color consistency of the shape area is determined based on the first image, and the determination of the color consistency of the shape area is conducive to quickly identifying the area with uneven color or defects, thereby facilitating the improvement of the overall appearance and reliability of the product; the bending area of the single-core tinned copper alloy wire is determined according to the shape area; when the color of the shape area is determined to be consistent based on the first image, the quality detection result of the single-core tinned copper alloy wire is determined based on the texture characteristics of the single-core tinned copper alloy wire in the bending area, and focusing on the detection of the bending area (the area where defects are most likely to occur) is conducive to reducing the detection time and improving the overall detection efficiency. Therefore, the single-core tin-plated copper alloy wire quality inspection method provided in the embodiment of the present application is not only conducive to improving the accuracy and efficiency of quality inspection through a comprehensive and progressive inspection process of the shape, color consistency and texture characteristics of the single-core tin-plated copper alloy wire, but also conducive to timely discovering potential quality problems, thereby providing strong support for product quality control and continuous improvement.
[0087] The single-core tin-plated copper alloy wire quality detection method provided in the embodiment of the present application can be applied to a single-core tin-plated copper alloy wire quality detection device. At this time, the single-core tin-plated copper alloy wire quality detection device is the executor of the single-core tin-plated copper alloy wire quality detection method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the single-core tin-plated copper alloy wire quality detection device.
[0088] For example, the quality inspection equipment for single-core tinned copper alloy wire may include a camera, an adjustment device and a control device. The camera is arranged on the adjustment device. The control device is connected to the camera and the adjustment device in communication (it may be a wired communication connection or a wireless communication connection). The control device is used to control the adjustment device and the camera. The adjustment device is a device used to adjust the shooting angle or shooting position of the camera. For example, the adjustment device may be a rotating base, a manipulator, etc., but is not limited thereto. For example, the control device may be a single-chip microcomputer, a WeChat controller, a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart large screen, a smart TV, a handheld device with wireless communication function, a computing device, a computer, a laptop computer, a handheld communication device, a handheld computing device, etc., but is not limited thereto.
[0089] In order to better understand the single-core tin-plated copper alloy wire quality detection method provided in the embodiment of the present application, the specific implementation process of the single-core tin-plated copper alloy wire quality detection method provided in the embodiment of the present application is exemplarily introduced below.
[0090] Figure 1 A schematic flow chart of a single-core tinned copper alloy wire quality detection method provided in an embodiment of the present application is shown. The single-core tinned copper alloy wire quality detection method includes:
[0091] S100, obtaining a first image of a single-core tinned copper alloy wire, wherein the first image is obtained by photographing the single-core tinned copper alloy wire with a camera.
[0092] It can be understood that any segment of the single-core tinned copper alloy wire reflected in the first image does not overlap or cross other segments.
[0093] Exemplarily, after the control device of the single-core tinned copper alloy wire quality inspection equipment receives the detection signal (wherein, the detection signal may be manually input or manually triggered, but is not limited thereto), the control adjustment device adjusts the position of the camera so that the camera is facing the single-core tinned copper alloy wire to be tested, so as to facilitate the camera to clearly shoot the single-core tinned copper alloy wire (wherein, the single-core tinned copper alloy wire can be placed in the placement area, and the placement area includes a plurality of sub-areas at different positions, each of which can be placed with a single-core tinned copper alloy wire; the control device can control the adjustment device to adjust the shooting end of the camera toward the sub-area in the placement area where the single-core tinned copper alloy wire to be tested is located). After the camera completes shooting the single-core tinned copper alloy wire, it transmits the captured image data to the image processing unit of the control device of the single-core tinned copper alloy wire quality inspection equipment for storage.
[0094] S200, determining the shape features and shape region of the single-core tinned copper alloy wire based on the first image, wherein the shape features include the length and width of the single-core tinned copper alloy wire, and the shape region is the two-dimensional space range occupied by the single-core tinned copper alloy wire in the first image.
[0095] Exemplarily, an image processing algorithm (such as a Canny edge detection algorithm, a contour tracking algorithm, etc.) can be used to detect the contour of the single-core tinned copper alloy wire in the first image, and then calculate the length and width of the single-core tinned copper alloy wire. Based on the contour of the single-core tinned copper alloy wire, the specific position of the single-core tinned copper alloy wire in the first image, that is, the shape area, can be determined.
[0096] In one possible implementation, see Figure 2 , S200, determining the shape characteristics and shape area of the single-core tinned copper alloy wire based on the first image, including:
[0097] S210, performing edge detection on the first image to obtain an edge detection result.
[0098] Exemplarily, the edge of the single-core tinned copper alloy wire may be extracted from the first image by applying the Canny edge detection algorithm.
[0099] S220, extracting the outline of the single-core tinned copper alloy wire according to the edge detection result.
[0100] Exemplarily, the contour of the single-core tinned copper alloy wire in the edge detection result can be extracted using Hough transform or contour tracking algorithm, but is not limited thereto. For example, the contour tracking algorithm can be used to start from a point in the edge detection result and gradually track along the edge until it returns to the starting point, thereby forming a complete contour.
[0101] S230: Determine a shape area based on the outline.
[0102] For example, the shape region of the single-core tinned copper alloy wire may be determined according to a region surrounded by the outline of the single-core tinned copper alloy wire in the first image.
[0103] S240, extracting shape features from the contour.
[0104] For example, a curve fitting algorithm (such as the least squares method) can be used to fit the contour points to obtain a smooth curve, and the length of the curve can be calculated by integration to obtain the length of the single-core tin-plated copper alloy wire; or the contour length can be calculated using a function in an image processing library (such as OpenCV) to obtain the length of the single-core tin-plated copper alloy wire.
[0105] Exemplarily, the curvature of the single-core tinned copper alloy wire can be detected by using image processing technology (e.g., curvature calculation, contour fitting, etc.), and the segmentation points (e.g., positions where the curvature changes greatly) can be determined according to the change in the curvature. The single-core tinned copper alloy wire is segmented according to the determined segmentation points. In each segment, the width is determined by calculating the difference between the maximum and minimum abscissas (or ordinates, depending on the direction of the single-core tinned copper alloy wire) of the contour points in the segment.
[0106] Through the above steps S210 to S240, the single-core tinned copper alloy wire in the first image is identified and analyzed, the shape features (length and width) are obtained, and the shape area is determined. Through image processing technologies such as edge detection and contour extraction, the accuracy and efficiency of the shape feature extraction of the single-core tinned copper alloy wire are effectively improved, providing a reliable data basis for subsequent processing or analysis.
[0107] S300, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, determining whether the color of the shape region is consistent based on the first image.
[0108] For example, when the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape characteristics, a color recognition algorithm (such as color space conversion) can be used to analyze whether the colors of the pixels in the shape area are consistent. If the color of the pixel fluctuates within the allowed range, the color is considered consistent, and the proportion of pixels with consistent colors to all pixels is calculated. Whether the color of the shape area is consistent is determined based on the proportion of pixels with consistent colors to all pixels.
[0109] In one possible implementation, see Figure 3 S300, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, before determining whether the color of the shape area is consistent based on the first image, the method further includes:
[0110] S301, judging whether the shape feature is within the standard range.
[0111] It can be understood that the standard range is that the length and width of the single-core tinned copper alloy wire are within a preset specified range. The preset specified range can be set by ordinary technicians in this field according to actual needs and is not the only limitation here.
[0112] Exemplarily, the standard range may be the length of a single core tinned copper alloy wire: [1 m, 1.02 m], width: [0.5 mm, 1.5 mm].
[0113] S302, if the shape feature is not within the standard range, it is determined that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0114] It can be understood that if one of the length and width of the single-core tinned copper alloy wire is out of the standard range, the quality inspection result of the single-core tinned copper alloy wire is determined to be unqualified.
[0115] S303, if the shape feature is within the standard range, it is determined that the shape of the single-core tinned copper alloy wire is qualified.
[0116] It can be understood that if the length and width of the single-core tinned copper alloy wire are both within the standard range, it is determined that the quality test result of the single-core tinned copper alloy wire is qualified.
[0117] Through the above steps S301 to S303, a clear quality standard is set for the shape characteristics of the single-core tinned copper alloy wire, and through the determination and screening of the shape characteristics of the single-core tinned copper alloy wire, it is helpful to exclude products with unqualified shapes and improve the overall quality stability of the product.
[0118] In one possible implementation, see Figure 4 S300, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, determining whether the color of the shape area is consistent based on the first image, including:
[0119] S310, when it is determined according to the shape feature that the shape of the single-core tinned copper alloy wire is qualified, counting the proportion of pixels with the same color in the shape region.
[0120] Exemplarily, after determining that the shape of the single-core tinned copper alloy wire is qualified based on the shape characteristics, the color of the pixel is consistent by judging whether the difference between the color value of each pixel and the median of all color values is within the tolerance range, and the proportion of pixels with consistent colors in the shape area is counted.
[0121] Optionally, see Figure 5 S310, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, the proportion of pixels with the same color in the shape area is counted, including:
[0122] S311, when it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, all pixel points in the shape area are traversed, and the HSV color value of each pixel point is extracted.
[0123] For example, in the OpenCV image processing library, the cv2.cvtColor function can be used to convert an image from the BGR color space (OpenCV default color space) to the HSV color space, traverse each pixel point in the shape area, and directly access its HSV (Hue, Saturation, Value) color value.
[0124] S312, calculating the median of the HSV color values of all pixels in the shape area.
[0125] Exemplarily, the HSV color values of all the extracted pixels may be stored, and the median may be calculated for each channel (H, S, V).
[0126] S313, comparing the difference between the HSV color value of each pixel and the median.
[0127] For example, the difference between the HSV color value of each pixel and the median can be calculated by calculating the Euclidean distance, the Manhattan distance or direct subtraction, wherein the H (hue) value is a cyclic value (0° to 360°), and the H value can be mapped to the range of [-180°, 180°] (i.e., if H>180°, then H=H-360°; if H<-180°, then H=H+360°). For example, the HSV color value of a pixel is (H1, S1, V1), and the median of the HSV color values of all pixels in the shape area is (Hm, Sm, Vm). For the H channel, H1 and Hm are mapped to the range of [-180°, 180°] to obtain H1' and Hm', and H1'-Hm' is calculated; for the S channel, [(S1-Sm) / Sm]×100% is calculated; for the V channel, [(V1-Vm) / Vm]×100% is calculated.
[0128] S314, determining whether the difference is within a tolerance range.
[0129] It can be understood that the tolerance range is that the difference between the HSV color value of each pixel and the median is within a preset specified interval. The preset specified interval can be set by ordinary technicians in this field according to actual needs and is not limited here.
[0130] Exemplarily, the tolerance range may be H channel (hue) tolerance: [-5°, +5°], S channel (saturation) tolerance: [-10%, +10%], V channel (brightness) tolerance: [-10%, +10%].
[0131] S315: If the difference is within the tolerance range, the pixel is recorded as a pixel with consistent color.
[0132] It can be understood that if the differences between the color values of the H channel, S channel and V channel of a pixel and the median are all within the corresponding tolerance range, then the color of the pixel can be considered to be consistent with the colors of other pixels in the shape area, so it is recorded as a pixel with consistent color.
[0133] S316: If the difference is not within the tolerance range, the pixel point is not recorded as a pixel point with the same color.
[0134] It can be understood that if the difference between the color value of a pixel and the median exceeds the tolerance range, then the color of the pixel can be considered inconsistent with the colors of other pixels in the shape area, and the pixel is not recorded as a pixel with consistent color.
[0135] S317, calculating the ratio of pixels with the same color to all pixels.
[0136] For example, after traversing all the pixels and determining whether their colors are consistent, the number of pixels with consistent colors may be counted, and the proportion of pixels with consistent colors to the total number of pixels may be calculated.
[0137] Through the above steps S311 to S317, all pixels in the shape area are traversed and HSV color values are extracted. The median is calculated and compared with the color value of each pixel, so that the degree of color consistency in the shape area can be analyzed. By calculating the proportion of pixels with consistent colors to all pixels, a quantitative evaluation of the color consistency in the shape area of the single-core tinned copper alloy wire can be achieved, providing data support for subsequent quality control and product evaluation.
[0138] S320: Determine whether the ratio reaches a first threshold.
[0139] It can be understood that the first threshold is that the proportion of pixels with the same color in the shape area does not exceed a preset value, and the preset value can be set by ordinary technicians in this field according to actual needs and is not limited here.
[0140] For example, a reasonable first threshold may be determined based on historical data and industry standards. For example, the first threshold is 90% (indicating that the color of the shape area is considered to be consistent only when at least 90% of the pixels have the same color).
[0141] S330: If the ratio reaches a first threshold, determine that the colors of the shape areas are consistent.
[0142] It can be understood that if the proportion of pixels with consistent colors to all pixels is greater than or equal to the first threshold, then it is determined that the color of the shape area is consistent.
[0143] S340: If the ratio does not reach the first threshold, it is determined that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0144] It can be understood that if the proportion of pixels with the same color to all pixels is less than the first threshold, it is determined that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0145] Through the above steps S310 to S340, the color of the single-core tinned copper alloy wire can be quality inspected. When the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape characteristics, the proportion of pixels with consistent colors in the shape area is counted, and the color consistency of the shape area and the quality inspection result of the single-core tinned copper alloy wire are determined to be qualified according to whether the proportion reaches a first threshold, which is conducive to identifying products with quality problems.
[0146] S400, determining a bending area of the single-core tinned copper alloy wire according to the shape area.
[0147] Exemplarily, the bending area of the single-core tinned copper alloy wire may be determined by calculating the curvature of each point on the center line of the shape area.
[0148] In one possible implementation, see Figure 6 , S400, determining the bending area of the single-core tinned copper alloy wire according to the shape area, including:
[0149] S410, determining a center line of the shape area according to the shape area, wherein the center line is used to reflect the geometric shape of the single-core tinned copper alloy wire.
[0150] For example, the center line may be determined by calculating the centroid of the shape area or using an algorithm such as the least squares method.
[0151] S420, calculating the curvature of each point on the center line.
[0152] For example, the curvature of each point on the center line may be calculated according to the coordinates of each point on the center line using a central difference method, a numerical differentiation method, or a curvature formula.
[0153] S430, determining the starting position and the end position of each curved subdomain according to the curvature of each point on the center line, wherein the curved subdomain is an area along the length direction of the single-core tinned copper alloy wire, where the curvature of each point on the center line within the shape area is greater than the curvature threshold, and any two curved subdomains do not overlap.
[0154] It can be understood that the curvature threshold is that the curvature of each point on the center line does not exceed a preset specified value. The preset specified value can be set by ordinary technicians in this field according to actual needs and is not limited here.
[0155] For example, a reasonable curvature threshold can be determined based on historical data and industry standards. For example, the curvature threshold is 0.04dm -1 .
[0156] Exemplarily, by traversing the center line, a point whose curvature is greater than a curvature threshold is encountered, and the curvature of the previous point of the point is not greater than the curvature threshold (or the point is the first point), the point is determined as the starting position of the curved subdomain, and from the starting position, the center line is continued to be traversed to encounter a point whose curvature is less than or equal to the curvature threshold and is determined as the end position of the curved subdomain, and the entire center line is continued to be traversed to determine the starting and end positions of all the curved subdomains.
[0157] S440, determining a bending region of the single-core tinned copper alloy wire according to a starting position and an end position of each bending sub-region.
[0158] Exemplarily, the center line can be mapped to the outline of the shape area, and a curve interpolation or fitting method (for example, linear interpolation, spline interpolation, polynomial fitting, and Bezier curve fitting, etc.) can be used to connect the corresponding points of the starting position and the end position of the curved subdomain on the shape area to obtain a smooth boundary of the curved subdomain, and the curved area is determined based on the boundary of each curved subdomain.
[0159] Through the above steps S410 to S440, the curvature of each point on the center line is calculated, and the starting and ending positions of the bending subdomain are determined, so as to identify the bending area of the single-core tin-plated copper alloy wire, which not only helps to determine the geometric shape and bending degree of the single-core tin-plated copper alloy wire, but also can provide strong support for subsequent quality inspection.
[0160] S500: When it is determined based on the first image that the color of the shape area is consistent, determine the texture feature of the single-core tinned copper alloy wire in the bending area based on the bending area of the single-core tinned copper alloy wire.
[0161] Exemplarily, when the color of the shape area is consistent based on the first image, the LBP feature vector of each sub-area in the bending area can be calculated according to the local binary pattern, thereby obtaining the texture characteristics of the single-core tinned copper alloy wire in the bending area.
[0162] In one possible implementation, see Figure 7 S500, when it is determined based on the first image that the color of the shape area is consistent, determining the texture feature of the single-core tinned copper alloy wire in the bending area based on the bending area of the single-core tinned copper alloy wire, including:
[0163] S510 , when it is determined based on the first image that the color of the shape area is consistent, LBP calculation is performed on the bending area of the single-core tinned copper alloy wire to obtain the LBP value of each pixel point in the bending area.
[0164] For example, for each pixel point in the curved area, a window of 3x3 or larger size is defined as a neighborhood with each pixel point as the center, and the grayscale values of the central pixel point and its neighboring pixel points are compared. If the grayscale value of the neighboring pixel point is greater than or equal to the grayscale value of the corresponding central pixel point, the neighboring pixel point is marked as 1, otherwise it is marked as 0, and a binary number is obtained, that is, the LBP value of the central pixel point. For example, a 3x3 window is defined as a neighborhood, and the grayscale values of the central pixel point and its neighboring pixel points are: , after comparison, we get , then the LBP value of the center pixel is 00010011.
[0165] S520, determining the LBP feature vector of each sub-region in the curved region based on the LBP value of each pixel point, wherein the sub-region is a region of the same preset area divided in sequence from the curved region.
[0166] For example, for each sub-region, the LBP values of all pixels inside it are calculated, and a histogram is generated for each sub-region, where each bucket (bin) of the histogram represents a possible LBP value pattern, and the height of the bucket represents the frequency of the LBP value pattern in the sub-region. An equivalent pattern can be used. When the cyclic binary number corresponding to a certain LBP value jumps from 0 to 1 or from 1 to 0 at most twice, the binary corresponding to the LBP value is called an equivalent pattern class. Patterns other than the equivalent pattern class are classified into another class (called a mixed pattern class). The number of LBP value patterns is p(p-1)+2, where p represents the number of neighborhood pixels. Convert a histogram into an LBP feature vector. For example, each curved region in the shape region is divided into sub-region A, sub-region B, sub-region C, etc. of the same preset area in sequence. In sub-region A, for a 3x3 neighborhood, the LBP value of the pixel is an 8-bit binary number, there are 58 possible LBP value modes, and the LBP feature vector is [1, 3, ...], where the first element (1) of the LBP feature vector indicates that the LBP value has 0 jumps (all 0 or 1) and appears once in sub-region A, and the second element (3) indicates that the LBP value has 1 jump (for example, 00000001, 11110000, etc.) and appears 3 times in sub-region A.
[0167] S530: Determine the LBP feature vector as a texture feature.
[0168] It can be understood that the LBP feature vector of each sub-region is used as the texture feature of the corresponding sub-region.
[0169] Through the above steps S510 to S530, the bending area is subdivided into sub-areas, and the LBP feature vector is calculated for each sub-area respectively, which is conducive to more accurately describing the texture features of different parts in the bending area. The LBP feature vector of each sub-area is determined as the texture feature of the corresponding sub-area in the bending area, which provides strong support for the subsequent quality inspection of the single-core tinned copper alloy wire.
[0170] S600: Determine a quality inspection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in a bending area.
[0171] Exemplarily, whether the single-core tinned copper alloy wire has defects can be judged based on the texture features of the single-core tinned copper alloy wire in the bending area, thereby determining whether the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0172] In one possible implementation, see Figure 8 S600, determining the quality inspection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in the bending area, including:
[0173] S610: Determine the difference between each sub-region and all adjacent sub-regions in the curved region according to the texture feature, wherein the difference is used to reflect the difference between the texture features of each sub-region and all adjacent sub-regions in the curved region.
[0174] For example, the Euclidean distance or Manhattan distance between the LBP feature vectors of each sub-region and all its adjacent sub-regions may be calculated as the difference.
[0175] Optionally, see Fig. 9 , S610, determining the difference between each sub-region and all adjacent sub-regions in the curved region according to the texture feature, including:
[0176] S611, calculating the difference between the LBP feature vectors of each sub-region in the curved region and all adjacent sub-regions according to the texture features.
[0177] For example, the difference between the LBP feature vectors of each sub-region and all its adjacent sub-regions can be obtained by calculating the Euclidean distance, Manhattan distance, etc. between two LBP feature vectors. For example, the Euclidean distance between two LBP feature vectors is: , the Manhattan distance between two LBP feature vectors is: , where x i is the i-th element in the LBP feature vector x, y i is the i-th element in the LBP feature vector y, and n is the number of elements in the LBP feature vector.
[0178] S612: normalize the difference values to obtain the difference between each sub-region in the curved region and all adjacent sub-regions.
[0179] Exemplarily, methods such as min-max normalization and z-score normalization may be used. For example, min-max normalization is to subtract the minimum value of all difference values from each difference value and divide it by the difference between the maximum value and the minimum value of all difference values, thereby scaling each difference value to between 0 and 1, and obtaining the difference between each sub-region in the curved region and all adjacent sub-regions.
[0180] Through the above steps S611 to S612, the difference in texture features between each sub-region in the curved region and its adjacent sub-regions can be quantified, so as to further analyze the curved region.
[0181] Optionally, at S610, after determining the difference between each sub-region and all adjacent sub-regions according to the texture feature, the method further includes:
[0182] S6101: If there is no difference between a sub-region and an adjacent sub-region that exceeds the second threshold, or the proportion of adjacent sub-regions that exceed the second threshold does not reach a preset ratio, it is determined that the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0183] It can be understood that the second threshold is that the difference between the sub-region and the adjacent sub-region does not exceed a preset specified value, and the preset specified value can be set by ordinary technicians in this field according to actual needs and is not limited here.
[0184] It can be understood that the preset ratio is that the number of adjacent sub-areas exceeding the second threshold does not exceed another preset specified value, and the preset specified value can be set by ordinary technicians in this field according to actual needs and is not limited here.
[0185] Exemplarily, a reasonable second threshold and preset ratio can be determined based on historical data and industry standards. For example, the second threshold is 0.5, and the preset ratio is 25%. If the difference between all sub-regions and adjacent sub-regions does not exceed the second threshold, or although the difference between some sub-regions exceeds the second threshold, the number of these sub-regions does not reach the preset ratio, then the quality test result of the single-core tinned copper alloy wire can be determined to be qualified.
[0186] Through the above step S6101, a reasonable and clear second threshold value and a preset ratio are set, so as to realize the automation and standardization of the quality detection of the single-core tinned copper alloy wire, which is conducive to improving the product quality.
[0187] S620: If the difference between a sub-region and an adjacent sub-region exceeds a second threshold, and the number of adjacent sub-regions exceeding the second threshold accounts for a preset ratio, the sub-region is determined as a defective region.
[0188] Exemplarily, a second threshold (such as 0.5) and a preset ratio (such as 25%) can be set. If the difference between a sub-region and its adjacent sub-region exceeds the second threshold, and the number of adjacent sub-regions exceeding the second threshold accounts for the preset ratio, then the sub-region is considered to have a texture defect and is determined to be a defective region.
[0189] S630, judging whether the single-core tinned copper alloy wire has defects according to the areas of all defective regions.
[0190] Exemplarily, an area threshold can be set based on historical data and industry standards, and the areas of all defective areas are added together. If the total area exceeds the area threshold, it is determined that the single-core tinned copper alloy wire has defects, otherwise it is determined that the single-core tinned copper alloy wire does not have defects.
[0191] S640, if the single-core tinned copper alloy wire has defects, determine that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0192] It can be understood that if there are defects in the single-core tinned copper alloy wire, the quality inspection result of the single-core tinned copper alloy wire is unqualified.
[0193] S650: If the single-core tinned copper alloy wire has no defects, it is determined that the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0194] It can be understood that if there is no defect in the single-core tinned copper alloy wire, the quality inspection result of the single-core tinned copper alloy wire is qualified.
[0195] Through the above steps S610 to S650, the texture features of the bending area of the single-core tinned copper alloy wire are analyzed to determine whether the single-core tinned copper alloy wire has defects, and the corresponding quality inspection results are given, which is conducive to improving the efficiency and accuracy of the quality inspection of the single-core tinned copper alloy wire.
[0196] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0197] Corresponding to the single-core tinned copper alloy wire quality detection method described in the above embodiment, the embodiment of the present application also provides a single-core tinned copper alloy wire quality detection device, and each module of the device can implement each step of the single-core tinned copper alloy wire quality detection method. Fig.10 A structural block diagram of a single-core tinned copper alloy wire quality detection device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0198] Reference Fig.10 , the device comprises:
[0199] An acquisition module, used to acquire a first image of a single-core tinned copper alloy wire; wherein the first image is obtained by photographing the single-core tinned copper alloy wire with a camera;
[0200] A shape module, configured to determine a shape feature and a shape region of the single-core tinned copper alloy wire based on the first image; wherein the shape feature includes a length and a width of the single-core tinned copper alloy wire in the first image, and the shape region is a two-dimensional space range occupied by the single-core tinned copper alloy wire in the first image;
[0201] a color module, for determining whether the color of the shape area is consistent based on the first image when the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature;
[0202] A bending area module, used to determine the bending area of the single-core tinned copper alloy wire according to the shape area;
[0203] a texture feature module, configured to determine a texture feature of the single-core tinned copper alloy wire in the bending region based on the bending region of the single-core tinned copper alloy wire, when it is determined based on the first image that the color of the shape region is consistent;
[0204] A quality detection module is used to determine the quality detection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in the bending area.
[0205] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0206] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0207] The present application also provides a single-core tinned copper alloy wire quality inspection device, Fig.11 This is a schematic diagram of the structure of a single-core tinned copper alloy wire quality inspection device provided in one embodiment of the present application. Fig.11As shown, the single-core tinned copper alloy wire quality detection device 6 of this embodiment includes: at least one processor 60 ( Fig.11 Only one is shown), at least one memory 61 ( Fig.11 Only one is shown in the figure) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the single-core tinned copper alloy wire quality detection device 6 implements the steps in any of the above-mentioned single-core tinned copper alloy wire quality detection method embodiments, or the single-core tinned copper alloy wire quality detection device 6 implements the functions of each module / unit in the above-mentioned device embodiments.
[0208] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the single-core tinned copper alloy wire quality detection device 6.
[0209] The single-core tinned copper alloy wire quality inspection device 6 may include a camera, an adjustment device and a control device. The camera is arranged on the adjustment device. The control device is connected to the camera and the adjustment device in communication (it may be a wired communication connection or a wireless communication connection). The control device is used to control the adjustment device and the camera. The adjustment device is a device used to adjust the shooting angle or shooting position of the camera. The control device of the single-core tinned copper alloy wire quality inspection device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that Fig.11 It is only an example of the single-core tinned copper alloy wire quality inspection device 6 and does not constitute a limitation on the single-core tinned copper alloy wire quality inspection device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, buses, etc.
[0210] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0211] In some embodiments, the memory 61 may be an internal storage unit of the single-core tinned copper alloy wire quality detection device 6, such as a hard disk or memory of the single-core tinned copper alloy wire quality detection device 6. In other embodiments, the memory 61 may also be an external storage device of the single-core tinned copper alloy wire quality detection device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the single-core tinned copper alloy wire quality detection device 6. Further, the memory 61 may also include both the internal storage unit and the external storage device of the single-core tinned copper alloy wire quality detection device 6. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0212] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0213] An embodiment of the present application provides a computer program product. When the computer program product is run on a single-core tinned copper alloy wire quality inspection device, the single-core tinned copper alloy wire quality inspection device implements the steps in any of the above-mentioned method embodiments.
[0214] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device, recording medium, computer memory, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium that can carry the computer program code to the single-core tinned copper alloy wire quality detection device / single-core tinned copper alloy wire quality detection device. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0215] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0216] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0217] In the embodiments provided in the present application, it should be understood that the disclosed single-core tin-plated copper alloy wire quality detection device / single-core tin-plated copper alloy wire quality detection equipment and method can be implemented in other ways. For example, the single-core tin-plated copper alloy wire quality detection device / single-core tin-plated copper alloy wire quality detection equipment embodiment described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0219] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for detecting the quality of a single-core tinned copper alloy wire, characterized in that: include: Acquire a first image of a single-core tinned copper alloy wire; wherein the first image is obtained by photographing the single-core tinned copper alloy wire with a camera; Determine the shape feature and shape area of the single-core tinned copper alloy wire based on the first image; wherein the shape feature includes the length and width of the single-core tinned copper alloy wire, and the shape area is the two-dimensional space range occupied by the single-core tinned copper alloy wire in the first image; In the case where the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature, determining whether the color of the shape area is consistent based on the first image; determining a bending area of the single-core tinned copper alloy wire according to the shape area; In the case where the color of the shape area is determined to be consistent based on the first image, determining the texture feature of the single-core tinned copper alloy wire in the bending area based on the bending area of the single-core tinned copper alloy wire, including: in the case where the color of the shape area is determined to be consistent based on the first image, performing LBP calculation on the bending area of the single-core tinned copper alloy wire to obtain the LBP value of each pixel point in the bending area; determining the LBP feature vector of each sub-area in the bending area based on the LBP value of each pixel point; wherein the sub-area is the area of the same preset area divided into the bending area in sequence; and determining the LBP feature vector as the texture feature; Determining a quality inspection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in the bending area; Wherein, determining the quality inspection result of the single-core tinned copper alloy wire based on the texture characteristics of the single-core tinned copper alloy wire in the bending area includes: Determining the difference between each sub-region and all adjacent sub-regions in the curved region according to the texture features, including: calculating the difference between the LBP feature vectors of each sub-region and all adjacent sub-regions in the curved region according to the texture features; normalizing the difference to obtain the difference between each sub-region and all adjacent sub-regions in the curved region; wherein the difference is used to reflect the difference between the texture features of each sub-region and all adjacent sub-regions in the curved region; If the difference between a sub-region and an adjacent sub-region exceeds a second threshold, and the proportion of adjacent sub-regions exceeding the second threshold reaches a preset ratio, the sub-region is determined as a defective region; Judging whether the single-core tinned copper alloy wire has defects according to the areas of all defective regions; If the single-core tinned copper alloy wire has defects, determining that the quality inspection result of the single-core tinned copper alloy wire is unqualified; If the single-core tinned copper alloy wire has no defects, determining that the quality inspection result of the single-core tinned copper alloy wire is qualified; If there is no sub-region whose difference with the adjacent sub-region exceeds the second threshold, or the proportion of the number of adjacent sub-regions exceeding the second threshold does not reach the preset proportion, it is determined that the quality inspection result of the single-core tinned copper alloy wire is qualified.
2. The single-core tinned copper alloy wire quality detection method according to claim 1, characterized in that: The determining of the shape feature and shape area of the single-core tinned copper alloy wire based on the first image comprises: Performing edge detection on the first image to obtain an edge detection result; Extracting the outline of the single-core tinned copper alloy wire according to the edge detection result; determining the shape region based on the contour; The shape feature is extracted from the contour.
3. The single-core tinned copper alloy wire quality detection method according to claim 1, characterized in that: In the case where the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature, before determining whether the color of the shape area is consistent based on the first image, the method further includes: Determining whether the shape feature is within a standard range; If the shape feature is not within the standard range, it is determined that the quality test result of the single-core tinned copper alloy wire is unqualified; If the shape feature is within the standard range, it is determined that the shape of the single-core tinned copper alloy wire is qualified.
4. The single-core tinned copper alloy wire quality detection method according to claim 1, characterized in that: In the case where the shape of the single-core tinned copper alloy wire is determined to be qualified according to the shape feature, determining whether the color of the shape area is consistent based on the first image includes: When it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, counting the proportion of pixels with the same color in the shape area; Determining whether the ratio reaches a first threshold; If the ratio reaches the first threshold, determining that the colors of the shape areas are consistent; If the ratio does not reach the first threshold, it is determined that the quality inspection result of the single-core tinned copper alloy wire is unqualified.
5. The single-core tinned copper alloy wire quality detection method according to claim 4, characterized in that: When it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, counting the proportion of pixels with the same color in the shape area includes: When it is determined that the shape of the single-core tinned copper alloy wire is qualified according to the shape feature, traverse all pixel points in the shape area and extract the HSV color value of each pixel point; Calculate the median of the HSV color values of all pixels in the shape area; Compare the difference between the HSV color value of each pixel and the median; determining whether the difference is within a tolerance range; If the difference is within the tolerance range, the pixel is recorded as a pixel with the same color; If the difference is not within the tolerance range, the pixel is not recorded as a pixel with the same color; Calculate the ratio of pixels with the same color to all the pixels.
6. The single-core tinned copper alloy wire quality detection method according to claim 1, characterized in that: The step of determining the bending area of the single-core tinned copper alloy wire according to the shape area comprises: Determining a center line of the shape area according to the shape area; wherein the center line is used to reflect the geometric shape of the single-core tinned copper alloy wire; calculating the curvature of each point on the center line; The starting position and the end position of each curved subdomain are determined according to the curvature of each point on the center line; wherein the curved subdomain is an area along the length direction of the single-core tinned copper alloy wire, in the shape area, where the curvature of each point on the center line is greater than the curvature threshold, and any two curved subdomains do not overlap each other; The bending area of the single-core tinned copper alloy wire is determined according to the starting position and the ending position of each bending sub-domain.
7. A single-core tinned copper alloy wire quality detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method, device and equipment for evaluating performance of silver-plated copper-clad steel wire
CN118067742A
Method and equipment for manufacturing single-core tinned copper alloy wire
CN118628445A