Crimping area size measurement method, computer equipment and storage medium

By aligning the direction of the crimping area through cropping and principal component analysis, calculating the grayscale change characteristics to generate a boundary response map and fitting a straight line, the problems of low efficiency and poor accuracy of existing crimping size measurement methods are solved, and efficient and stable online detection and batch detection are achieved.

CN121999024APending Publication Date: 2026-05-08GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
Filing Date
2026-01-28
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing crimping dimension measurement methods are inefficient, produce inconsistent results, and have poor accuracy. In particular, the measurement error is large when the metal terminal surface is highly reflective, the indentation structure is complex, the surface texture is uneven, or there is partial obstruction. These methods are difficult to meet the needs of online and batch inspection.

Method used

By cropping the target image, performing orientation alignment through principal component analysis, calculating grayscale change features to generate a boundary response map, selecting a candidate point set and performing straight line fitting, and combining the imaging system calibration parameters to convert them into actual physical dimensions, a deep learning model is used to locate and crop the pressing area, the boundary response map is enhanced, and the boundary straight line is fitted using a random sampling consistency algorithm.

Benefits of technology

It significantly improves measurement efficiency and accuracy, ensuring a unified measurement benchmark under different posture conditions, and meeting the online and batch inspection needs of the crimping production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121999024A_ABST
    Figure CN121999024A_ABST
Patent Text Reader

Abstract

The invention discloses a crimping area size measurement method, computer equipment and a storage medium, and effectively solves many problems of an existing crimping size measurement method through the steps of cutting a target image, performing direction alignment through principal component analysis, calculating gray change characteristics to generate a boundary response diagram, selecting a candidate point set, performing straight line fitting and the like. Compared with manual measurement, the measurement efficiency is greatly improved, and the problem of inconsistent measurement results caused by experience of operators and difference of measurement postures is avoided; compared with a traditional image-based measurement method, the method has the advantages that a boundary response diagram can be generated more stably under the conditions of strong reflection of the surface of the metal terminal, complex indentation structure, non-uniform surface texture or local shielding and the like, and measurement errors are reduced; besides, by performing direction alignment processing on the crimping area, it is ensured that a unified measurement basis can be obtained under different posture conditions, so that the measurement precision is remarkably improved, and the requirements of a crimping production line for online detection and batch detection are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial measurement technology, and in particular to a method for measuring the size of a pressing area, a computer device, and a storage medium. Background Technology

[0002] Currently, existing methods for measuring crimp dimensions mainly rely on manual caliper measurement or simple image-based projection analysis. Manual measurement is inefficient, and the results are easily affected by the operator's experience and posture, making it difficult to meet the requirements of online and batch inspection in crimping production lines, and the consistency of measurement results is also poor. While image-based dimension measurement methods improve inspection efficiency to some extent, they typically use grayscale projection, simple threshold segmentation, or edge strength analysis to estimate crimp dimensions. When there is strong reflection on the metal terminal surface, complex indentation structure, uneven surface texture, or local occlusion, the image grayscale distribution will change drastically, leading to unstable projection curves or broken edge responses, thus introducing significant measurement errors.

[0003] Furthermore, the crimped terminals undergo posture changes and installation angle differences during imaging, resulting in an inconsistent crimping axial direction in the image. This further increases the complexity of dimensional measurement. Without orientation alignment of the crimped area, simple projection or edge analysis methods struggle to obtain a unified measurement benchmark under different posture conditions, severely impacting measurement accuracy.

[0004] The above information is provided as background information only to aid in understanding the present invention, and does not constitute an assertion or admission that any of the above content can be used as prior art relative to the present invention. Summary of the Invention

[0005] This invention provides a method for measuring the size of the crimped area, a computer device, and a storage medium to solve the problems existing in the prior art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a method for measuring the size of a pressing area, the method comprising:

[0008] S101. Based on the image of the crimped terminal to be measured, a target image including the crimped area is obtained by cropping.

[0009] S102. Perform principal component analysis on the target image to determine the principal axis direction of the pressing area, and perform rotation correction on the target image according to the principal axis direction to align the principal axis direction with the preset coordinate axis direction;

[0010] S103. In the target image, calculate the grayscale change features along the direction perpendicular to the main axis, and generate a boundary response map that highlights the pressing boundary.

[0011] S104. In the boundary response map, select the pixels with high boundary response intensity as the candidate point set;

[0012] S105. Perform line fitting on the candidate point set to obtain the upper and lower boundary lines respectively;

[0013] S106. Calculate the distance between the two boundary lines to determine the actual physical dimensions of the crimping area.

[0014] Further, in the method for measuring the size of the crimping area, step S101 includes:

[0015] S1011. Input the image of the crimped terminal to be measured into the crimped area detection model to obtain the positioning result of the crimped area;

[0016] S1012. Based on the positioning result, the image of the crimp terminal is cropped to obtain the target image.

[0017] Furthermore, in the method for measuring the size of the crimped area, after S103 and before S104, the method further includes:

[0018] S103.5. Enhance the boundary response map to strengthen the continuous boundary response.

[0019] Further, in the method for measuring the size of the pressing area, step S104 includes:

[0020] S1041. In the boundary response map, select pixels with boundary response intensity greater than a preset intensity threshold as candidate point set.

[0021] Further, in the method for measuring the size of the pressing area, step S105 includes:

[0022] S1051. The candidate point set is fitted with a straight line using a random sampling consensus algorithm to obtain the upper and lower boundary straight lines respectively.

[0023] Further, in the method for measuring the size of the crimping area, step S106 includes:

[0024] S1061. Calculate the distance between the two boundary lines to serve as the pixel size of the pressing area;

[0025] S1062. Based on the calibration parameters of the imaging system, the pixel size is converted into the actual physical size.

[0026] Furthermore, in the method for measuring the size of the crimped area, after step S106, the method further includes:

[0027] S107. Compare the actual physical size with the preset size threshold, and output the judgment result of whether the actual physical size is qualified.

[0028] Furthermore, in the method for measuring the size of the crimped area, after step S107, the method further includes:

[0029] S108. Store and / or visualize the determination result.

[0030] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the crimping area size measurement method provided in the first aspect above.

[0031] Thirdly, the present invention provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions being executed by a computer processor to implement the crimping area size measurement method as provided in the first aspect above.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] This invention provides a method, computer device, and storage medium for measuring the dimensions of a crimping area. Through steps such as cropping the target image, performing directional alignment using principal component analysis, calculating grayscale change features to generate a boundary response map, and selecting a candidate point set for linear fitting, it effectively solves many problems of existing crimping dimension measurement methods. Compared to manual measurement, it significantly improves measurement efficiency and avoids inconsistencies in measurement results caused by differences in operator experience and measurement posture. Compared to traditional image-based measurement methods, it can more stably generate boundary response maps and reduce measurement errors when faced with strong surface reflections on metal terminals, complex indentation structures, uneven surface textures, or local occlusion. Furthermore, by performing directional alignment processing on the crimping area, it ensures a uniform measurement benchmark under different posture conditions, thereby significantly improving measurement accuracy and meeting the needs of crimping production lines for online and batch inspection, which is conducive to widespread application.

[0034] The present invention has other features and advantages, which will be apparent from or will be set forth in detail in the accompanying drawings and the following detailed description, which together serve to explain the particular principles of the invention. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is one of the flowcharts illustrating a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0037] Figure 2 This is a schematic diagram of the image of the crimped terminal to be measured provided in Embodiment 1 of the present invention;

[0038] Figure 3 This is a schematic diagram of the target image including the crimping area obtained by cropping according to Embodiment 1 of the present invention;

[0039] Figure 4 This is a schematic diagram of the target image aligned along the main axis provided in Embodiment 1 of the present invention;

[0040] Figure 5 This is a schematic diagram of the fitted boundary straight line (A is collinear pressing, B is non-collinear pressing) provided in Embodiment 1 of the present invention;

[0041] Figure 6 This is a further detailed flowchart of S101 provided in Embodiment 1 of the present invention;

[0042] Figure 7 This is a second schematic flowchart of a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0043] Figure 8 This is the third flowchart illustrating a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0044] Figure 9 This is the fourth flowchart of a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0045] Figure 10 This is a further detailed flowchart of S106 provided in Embodiment 1 of the present invention;

[0046] Figure 11 This is the fifth flowchart illustrating a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0047] Figure 12 This is the sixth flowchart of a method for measuring the size of a pressing area provided in Embodiment 1 of the present invention;

[0048] Figure 13 This is a schematic diagram of the structure of a computer device provided in Embodiment 2 of the present invention. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] Example 1

[0051] Please refer to Figure 1 This is a flowchart illustrating a method for measuring the size of a crimping area according to Embodiment 1 of the present invention. This method is suitable for scenarios requiring rapid and accurate measurement of the crimping area size of metal terminals on a crimping production line. The method can be implemented using software and / or hardware. Specifically, the method includes the following steps:

[0052] S101. Based on the image of the crimped terminal to be measured, a target image including the crimped area is obtained by cropping.

[0053] It should be noted that the acquired image includes the entire crimp terminal (e.g.) Figure 2 As shown in the figure, through a specific cropping operation, the parts of the image that are unrelated to the crimping area are removed, and only the part of the image containing the crimping area is retained, thus obtaining the target image (e.g. Figure 3 (As shown). The purpose of this is to focus on the crimped area that needs to be measured, reduce the amount of data to be processed subsequently, and improve processing efficiency and accuracy.

[0054] S102. Perform principal component analysis on the target image to determine the principal axis direction of the pressing area, and perform rotation correction on the target image according to the principal axis direction to align the principal axis direction with the preset coordinate axis direction;

[0055] It's important to note that principal component analysis (PCA) is a statistical method used to analyze the dominant orientation of data. Performing PCA on a target image involves identifying the main orientation of the pressed area within the image, i.e., the principal axis direction. This principal axis direction reflects the primary orientation of the pressed area within the image.

[0056] Since the principal axis direction of the crimped area in the acquired image may not be consistent with the preset coordinate axis direction, for the convenience and consistency of subsequent processing, the target image is rotated according to the determined principal axis direction to align the principal axis direction of the crimped area with the preset coordinate axis direction (e.g., ...). Figure 4(As shown). This allows the crimped area to have a standard orientation in the image, facilitating subsequent calculations and analyses based on the coordinate axes.

[0057] S103. In the target image, calculate the grayscale change features along the direction perpendicular to the main axis, and generate a boundary response map that highlights the pressing boundary.

[0058] It should be noted that the grayscale values ​​(i.e., the brightness values ​​of pixels) may differ in different regions of an image. At the boundaries of the overprinted areas, the grayscale values ​​usually change significantly. Calculating the grayscale variation characteristics along the direction perpendicular to the principal axis involves analyzing the changes in pixel grayscale values ​​in this specific direction within the image.

[0059] By calculating the grayscale variation characteristics, the parts with significant grayscale changes at the boundary of the pressing area are highlighted, generating a boundary response map. In the boundary response map, pixels at the boundary will have higher response values, thus making the boundary of the pressing area clearer.

[0060] S104. In the boundary response map, select the pixels with high boundary response intensity as the candidate point set;

[0061] It should be noted that different pixels in the boundary response map have different response intensities, and pixels with higher response intensities are more likely to be located on the boundary of the pressing area. Therefore, pixels with high response intensities are selected from the boundary response map to form a candidate point set. This candidate point set will serve as the basis for subsequently determining the boundary line.

[0062] S105. Perform line fitting on the candidate point set to obtain the upper and lower boundary lines respectively;

[0063] It should be noted that line fitting is a mathematical method used to find the straight line that best represents the distribution trend of a set of data points (here, a candidate point set). Applying line fitting to the candidate point set involves mathematical calculations to find two straight lines that best represent the upper and lower boundaries of the pressing area (e.g., ...). Figure 5 (As shown). These two straight lines can accurately describe the upper and lower boundary positions of the crimping area.

[0064] S106. Calculate the distance between the two boundary lines to determine the actual physical dimensions of the crimping area.

[0065] It should be noted that after obtaining the upper and lower boundary lines of the crimping area, the size of the crimping area in the image can be obtained by calculating the distance between these two lines. Since the image may have already been calibrated to the actual physical size during the measurement process (for example, by establishing the correspondence between image pixels and actual physical length using a calibration object of known size), the actual physical size of the crimping area can be determined based on this distance.

[0066] This invention effectively solves many problems of existing crimping dimension measurement methods by performing steps such as cropping the target image, principal component analysis for orientation alignment, calculating grayscale change features to generate a boundary response map, selecting candidate point sets, and performing line fitting. Compared with manual measurement, it significantly improves measurement efficiency and avoids inconsistencies in measurement results caused by differences in operator experience and measurement posture. Compared with traditional image-based measurement methods, it can generate boundary response maps more stably and reduce measurement errors when facing situations such as strong reflections on metal terminal surfaces, complex indentation structures, uneven surface textures, or local occlusion. In addition, by performing orientation alignment processing on the crimping area, it ensures that a unified measurement benchmark can be obtained under different posture conditions, thereby significantly improving measurement accuracy and meeting the needs of crimping production lines for online and batch inspection, which is conducive to widespread application.

[0067] Please refer to Figure 6 In one embodiment of this example, step S101 can be further refined to include the following sub-steps:

[0068] S1011. Input the image of the crimped terminal to be measured into the crimped area detection model to obtain the positioning result of the crimped area;

[0069] It should be noted that the crimping area detection model is a pre-trained model that learns from a large amount of labeled crimping terminal image data to master the ability to identify and locate crimping areas. This model can be a deep learning-based object detection model, such as Faster R-CNN or the YOLO (You Only Look Once) series. These models can analyze input images and identify the location and extent of crimping areas.

[0070] The actual image of the crimped terminal to be measured is input into this trained crimping area detection model. The model processes and analyzes the image, using its learned features and patterns to output the localization result of the crimping area in the image. This localization result is usually presented in the form of a bounding box, which clearly indicates the starting coordinates (such as the upper left corner) and ending coordinates (such as the lower right corner) of the crimping area in the image, or provides the center coordinates, length, and width of the bounding box, thereby determining the specific location and approximate range of the crimping area in the image.

[0071] S1012. Based on the positioning result, the image of the crimp terminal is cropped to obtain the target image.

[0072] It should be noted that after obtaining the location results (boundary box information) of the crimping area, this information is used to crop the original crimping terminal image. Specifically, based on the coordinate range determined by the boundary box, the portion of the image containing the crimping area is extracted from the original image.

[0073] The image obtained after cropping is the target image, which contains only the overprinted region, removing other parts of the original image that are unrelated to the overprinted region. This reduces the amount of data required for subsequent processing, avoids interference from irrelevant information in the measurement process, and makes subsequent analysis and measurement of the overprinted region more accurate and efficient. For example, when performing principal component analysis or calculating grayscale variation characteristics, only the overprinted region in the target image needs to be analyzed, allowing for a greater focus on the characteristics of the overprinted region itself and improving the accuracy and stability of the measurement.

[0074] Please refer to Figure 7 In one embodiment of this example, after S103 and before S104, the method further includes the following steps:

[0075] S103.5. Enhance the boundary response map to strengthen the continuous boundary response.

[0076] It should be noted that although the boundary response map generated in S103 has highlighted the pixels at the crimp boundary (these pixels have high response values), the boundary response in the boundary response map may not be completely continuous and clear due to the possibility of strong reflection, complex indentation structure, uneven surface texture, or local occlusion on the surface of the metal terminal. There may be some areas with weak or discontinuous response, which will affect the accurate identification and measurement of the boundary in the subsequent process.

[0077] Specific enhancement algorithms are used to manipulate the boundary response map, strengthening the response of continuous boundaries. This enhancement process can improve the response values ​​of previously weak continuous boundary regions in the boundary response map, while suppressing noise responses in non-boundary areas, making the boundary features more distinct and prominent.

[0078] Common enhancement methods are as follows:

[0079] Morphological processing: such as dilation and erosion operations. Dilation expands the boundary response region outward, connecting discontinuous boundary response points and strengthening continuous boundaries; erosion removes isolated noise points, further highlighting continuous boundaries. By appropriately combining dilation and erosion operations (such as opening operations (dilation followed by erosion) or closing operations (erosion followed by dilation), the boundary response can be effectively enhanced.

[0080] Filtering: Specific filters are used, such as improved versions of Gaussian filters or custom boundary enhancement filters. These filters can smooth and enhance the image based on the distribution characteristics of the boundary response, highlighting boundary features. For example, some edge enhancement filters enhance areas with sharp gray-level changes (i.e., boundary areas) while suppressing areas with gentle gray-level changes.

[0081] Histogram equalization: Adjusting the histogram of the boundary response map to make the pixel response values ​​more evenly distributed, thereby enhancing image contrast. This makes the boundary portions in the boundary response map more clearly visible, strengthening the response of continuous boundaries.

[0082] Please refer to Figure 8 In one embodiment of this example, step S104 can be further refined to include the following sub-steps:

[0083] S1041. In the boundary response map, select pixels with boundary response intensity greater than a preset intensity threshold as candidate point set.

[0084] It should be noted that each pixel in the boundary response map has a corresponding boundary response intensity value, which reflects the probability that the pixel is located on the boundary of the pressing area. The higher the response intensity value, the more likely the pixel is to be a point on the boundary.

[0085] The preset intensity threshold is a crucial filtering parameter, serving as a criterion for classification. By setting this threshold, pixels with sufficiently high response intensity in the boundary response map can be filtered out, while pixels with low response intensity that are unlikely to be boundary points are ignored. The setting of this threshold needs to be comprehensively considered and adjusted based on factors such as the actual application scenario, image quality, and the characteristics of the overprinted area. For example, if the image quality is good and the boundary features are clear, the threshold can be set relatively high to further eliminate noise interference; if the image has a lot of noise or the boundaries are not clear, the threshold may need to be appropriately lowered to ensure that true boundary points are not missed.

[0086] In selecting the candidate point set, all pixels in the boundary response map are traversed, and the boundary response intensity value of each pixel is compared with a preset intensity threshold. If the boundary response intensity value of a pixel is greater than the threshold, the pixel is included in the candidate point set; otherwise, the pixel is ignored. Through this screening process, the final candidate point set will contain pixels with high response intensity in the boundary response map. These points are more likely to be located on the true boundary of the pressing area, providing reliable data support for the subsequent line fitting of the candidate point set in S105 to obtain the upper and lower boundary lines. This helps improve the accuracy and stability of the boundary line fitting, thereby improving the accuracy of the overall pressing area size measurement.

[0087] Please refer to Figure 9 In one embodiment of this example, step S105 can be further refined to include the following sub-steps:

[0088] S1051. The candidate point set is fitted with a straight line using a random sampling consensus algorithm to obtain the upper and lower boundary straight lines respectively.

[0089] It should be noted that traditional one-dimensional measurement methods (such as those based on thresholds or edge strength) typically assume that the crimped area has a continuous structure and clear boundaries. However, in actual working conditions, the crimped area often suffers from irregular indentations, localized wear, or surface defects, leading to a large number of outliers or noise points mixed into the boundary response. These one-dimensional measurement methods lack effective mechanisms to suppress outliers and are highly susceptible to interference from strong local noise or missing boundaries, resulting in significant deviations in the measurement results and making it difficult to guarantee the stability and repeatability of the measurement results. Therefore, the embodiments of this application use a random sampling consensus algorithm for boundary line fitting, which can effectively suppress the influence of outlier noise points and local structural defects on the measurement results and improve the stability of dimensional measurements.

[0090] The random sample consensus algorithm is an iterative algorithm used to estimate mathematical model parameters from a dataset containing a large number of outliers. In the case of line fitting, its core idea is to fit a linear model by randomly selecting a small number of points in the dataset, and then determining the inliers (data points that conform to the model) and outliers (outlier or noise points) based on the model. This process is repeated continuously, and finally the model with the most inliers is selected as the optimal model.

[0091] Please refer to Figure 10 In one embodiment of this example, step S106 can be further refined to include the following sub-steps:

[0092] S1061. Calculate the distance between the two boundary lines to serve as the pixel size of the pressing area;

[0093] It should be noted that in the image plane, the distance between two parallel lines (in this embodiment, the upper and lower boundary lines obtained by fitting can be approximated as parallel) can be calculated using a mathematical formula. Assuming the equations of the two boundary lines are Ax + By + C1 = 0 and Ax + By + C2 = 0 respectively (since they are parallel, the coefficients of A and B are the same), based on the formula for the distance from a point to a line, the formula for calculating the distance d between two parallel lines is: .

[0094] S1062. Based on the calibration parameters of the imaging system, the pixel size is converted into the actual physical size.

[0095] It's important to note that when an imaging system (such as a camera) images objects from the real world onto the image plane, a mapping relationship exists. Calibration parameters are used to describe this mapping relationship; they reflect the correspondence between pixels in the image and their actual physical dimensions. Common calibration parameters include the camera's focal length, pixel size, and imaging distance. Using these parameters, a mathematical model can be established to convert the pixel dimensions in the image into their actual physical dimensions.

[0096] Please refer to Figure 11 In one embodiment of this example, after step S106, the method further includes the following steps:

[0097] S107. Compare the actual physical size with the preset size threshold, and output the judgment result of whether the actual physical size is qualified.

[0098] It should be noted that preset size thresholds are usually determined based on relevant industry standards, product design requirements, or process specifications. For example, in the crimping process of electronic connectors, there are clearly defined ranges for the width, height, and other dimensions of the crimping area, and these ranges are important bases for preset size thresholds.

[0099] In addition to standard specifications, the dimensional thresholds need to be adjusted appropriately based on actual production conditions, equipment precision, material properties, and other factors. For example, if the precision of the production equipment fluctuates, or if the materials used have a certain degree of elastic deformation, then a certain margin needs to be left when setting the dimensional thresholds to ensure that the product's qualification can be accurately judged in actual production.

[0100] The judgment results can be output in various ways, such as displaying the text information "qualified" or "unqualified" on the production equipment's display screen; they can also be indicated by sound prompts, such as different alarm sounds; or the judgment results can be transmitted to a host computer system or quality control system for further data analysis and processing.

[0101] The output judgment result can be used to guide subsequent operations in the production process. If the judgment result is qualified, the product can continue to the next production process; if the judgment result is unqualified, the product needs to be rejected, and the production process needs to be inspected and adjusted to find the cause of the dimensional non-compliance, such as equipment failure, incorrect parameter settings, material problems, etc., and take corresponding measures to improve it in a timely manner to ensure that the quality of subsequent products meets the requirements.

[0102] Please refer to Figure 12 In one embodiment of this example, in Figure 11 Based on step S107, the method further includes the following steps:

[0103] S108. Store and / or visualize the determination result.

[0104] It should be noted that this step aims to properly store and intuitively visualize the judgment results, which is of vital importance for product quality traceability, production process monitoring and analysis, and production decision-making, and helps to build a more complete and efficient production quality management system.

[0105] Although this invention uses terms such as trimming and principal component analysis frequently, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of this invention; interpreting them as any additional limitation would contradict the spirit of this invention.

[0106] Example 2

[0107] Figure 13 This is a schematic diagram of the structure of a computer device provided in Embodiment 2 of the present invention. Figure 13 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 13 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0108] like Figure 13 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0109] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0110] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0111] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 13 Not shown; usually referred to as a "hard drive"). Although Figure 13 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0112] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0113] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 13 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0114] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the crimping area size measurement method provided in the embodiments of the present invention.

[0115] Example 3

[0116] Embodiment 3 of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the crimping area size measurement method provided in all embodiments of the present invention.

[0117] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0119] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0120] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] Finally, it should be noted that although the above embodiments have been described in the description and drawings of this invention, this should not limit the scope of patent protection of this invention. Any technical solutions that are based on the essential concept of this invention, utilize the content described in the description and drawings of this invention to make equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this invention.

Claims

1. A method for measuring the size of a crimped area, characterized in that, The method includes: S101. Based on the image of the crimped terminal to be measured, a target image including the crimped area is obtained by cropping. S102. Perform principal component analysis on the target image to determine the principal axis direction of the pressing area, and perform rotation correction on the target image according to the principal axis direction to align the principal axis direction with the preset coordinate axis direction; S103. In the target image, calculate the grayscale change features along the direction perpendicular to the main axis, and generate a boundary response map that highlights the pressing boundary. S104. In the boundary response map, select the pixels with high boundary response intensity as the candidate point set; S105. Perform line fitting on the candidate point set to obtain the upper and lower boundary lines respectively; S106. Calculate the distance between the two boundary lines to determine the actual physical dimensions of the crimping area.

2. The method for measuring the size of the crimping area according to claim 1, characterized in that, S101 includes: S1011. Input the image of the crimped terminal to be measured into the crimped area detection model to obtain the positioning result of the crimped area; S1012. Based on the positioning result, the image of the crimp terminal is cropped to obtain the target image.

3. The method for measuring the size of the crimping area according to claim 1, characterized in that, After S103 and before S104, the method further includes: S103.

5. Enhance the boundary response map to strengthen the continuous boundary response.

4. The method for measuring the size of the crimping area according to claim 1, characterized in that, S104 includes: S1041. In the boundary response map, select pixels with boundary response intensity greater than a preset intensity threshold as candidate point set.

5. The method for measuring the size of the crimping area according to claim 1, characterized in that, S105 includes: S1051. The candidate point set is fitted with a straight line using a random sampling consensus algorithm to obtain the upper and lower boundary straight lines respectively.

6. The method for measuring the size of the crimping area according to claim 1, characterized in that, S106 includes: S1061. Calculate the distance between the two boundary lines to serve as the pixel size of the pressing area; S1062. Based on the calibration parameters of the imaging system, the pixel size is converted into the actual physical size.

7. The method for measuring the size of the crimping area according to claim 1, characterized in that, Following S106, the method further includes: S107. Compare the actual physical size with the preset size threshold, and output the judgment result of whether the actual physical size is qualified.

8. The method for measuring the size of the crimping area according to claim 7, characterized in that, Following S107, the method further includes: S108. Store and / or visualize the determination result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method for measuring the size of the crimped area as described in any one of claims 1-8.

10. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that, The computer-executable instructions are executed by a computer processor to implement the crimping area size measurement method as described in any one of claims 1-8.