CN-121999024-A - Crimping area size measurement method, computer equipment and storage medium
Abstract
The invention discloses a crimping area size measurement method, computer equipment and a storage medium, which effectively solve the problems of the traditional crimping area size measurement method by cutting a target image, performing direction alignment by principal component analysis, calculating gray change characteristics to generate a boundary response image, selecting a candidate point set, performing linear fitting and the like, greatly improve the measurement efficiency compared with manual measurement, avoid the problem of inconsistent measurement results caused by experience of an operator and measurement gesture difference, generate a boundary response image more stably when facing the conditions of strong reflection of a metal terminal surface, complicated indentation structure, uneven surface texture, partial shielding and the like compared with the traditional image-based measurement method, reduce measurement errors, and ensure that uniform measurement references can be obtained under different gesture conditions by performing direction alignment treatment on a crimping area, thereby remarkably improving the measurement precision and meeting the requirements of a crimping production line on online detection and batch detection.
Inventors
- WU JIANJIE
- FENG JUNJIE
- PAN WEI
- HUANG HONGZHAO
Assignees
- 广东电网有限责任公司东莞供电局
Dates
- Publication Date
- 20260508
- Application Date
- 20260128
Claims (10)
- 1. A method of crimp zone sizing, the method comprising: s101, cutting to obtain a target image comprising a crimping area according to a crimping terminal image to be measured; S102, performing principal component analysis on the target image, determining a main axis direction of the compression joint region, and performing rotation correction on the target image according to the main axis direction so as to align the main axis direction with a preset coordinate axis direction; S103, calculating gray level change characteristics along the direction perpendicular to the main axis direction in the target image, and generating a boundary response diagram highlighting a compression joint boundary; S104, selecting pixel points with high boundary response intensity from the boundary response graph as candidate point sets; S105, performing straight line fitting on the candidate point set to obtain an upper boundary straight line and a lower boundary straight line respectively; S106, calculating the distance between the two boundary straight lines to determine the actual physical size of the crimping area.
- 2. The crimping zone size measurement method according to claim 1, wherein the S101 includes: S1011, inputting a crimping terminal image to be measured into a crimping region detection model to obtain a positioning result of a crimping region; S1012, cutting the crimping terminal image according to the positioning result to obtain a target image.
- 3. The crimping zone size measurement method according to claim 1, characterized in that after said S103 and before said S104, the method further comprises: And S103.5, carrying out enhancement processing on the boundary response graph so as to strengthen continuous boundary response.
- 4. The crimp zone dimension measurement method of claim 1, wherein S104 comprises: s1041, selecting pixel points with boundary response intensity larger than a preset intensity threshold value as candidate point sets in the boundary response graph.
- 5. The crimping region size measurement method according to claim 1, wherein the S105 includes: S1051, performing straight line fitting on the candidate point set by adopting a random sampling consistency algorithm to respectively obtain an upper boundary straight line and a lower boundary straight line.
- 6. The crimping zone size measurement method according to claim 1, wherein the S106 includes: s1061, calculating the distance between two boundary straight lines to serve as the pixel size of the crimping area; S1062, combining calibration parameters of the imaging system, and converting the pixel size into an actual physical size.
- 7. The crimp zone size measurement method of claim 1, wherein after S106, the method further comprises: S107, comparing the actual physical size with a preset size threshold, and outputting a judging result of whether the actual physical size is qualified.
- 8. The crimping zone size measurement method of claim 7, wherein after S107, the method further comprises: s108, storing and/or visually displaying the judging result.
- 9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor, when executing the computer program, implements the crimp zone size measurement method of any one of claims 1-8.
- 10. A computer readable storage medium having stored thereon computer executable instructions for execution by a computer processor to implement the crimp zone size measurement method of any one of claims 1-8.
Description
Crimping area size measurement method, computer equipment and storage medium Technical Field The present invention relates to the field of industrial measurement technologies, and in particular, to a method for measuring a size of a crimping area, a computer device, and a storage medium. Background Currently, existing crimp size measurement methods rely mainly on manual caliper measurements or image-based simple projection analysis. The manual measurement efficiency is low, the measurement result is easily influenced by experience of an operator and the measurement gesture, the requirements of the crimping production line on online detection and batch detection are difficult to meet, and the consistency of the measurement result is poor. Although the image-based size measurement method improves the detection efficiency to a certain extent, the crimp size is generally estimated by adopting means such as gray level projection, simple threshold segmentation or edge intensity analysis. When strong reflection exists on the surface of the metal terminal, the indentation structure is complex, the surface texture is uneven or local shielding exists, the gray level distribution of the image can be changed drastically, so that the projection curve is unstable or the edge response is broken, and larger measurement error is introduced. Further, the crimp terminal has a variation in posture and a difference in mounting angle during photographing, resulting in the crimp axial direction not being fixed in the image, which further increases the complexity of the dimension measurement. If the direction alignment processing is not performed on the crimping area, a simple projection or edge analysis method is difficult to obtain a uniform measurement reference under different gesture conditions, so that the measurement accuracy is seriously affected. The above information is presented as background information only to aid in the understanding of the invention and is not intended to determine or acknowledge whether any of the foregoing is useful as prior art with respect to the invention. Disclosure of Invention The invention provides a crimping area size measuring method, computer equipment and a storage medium, which are used for solving the problems in the prior art. In order to achieve the above object, the present invention provides the following technical solutions: In a first aspect, the present invention provides a crimp zone size measurement method comprising: s101, cutting to obtain a target image comprising a crimping area according to a crimping terminal image to be measured; S102, performing principal component analysis on the target image, determining a main axis direction of the compression joint region, and performing rotation correction on the target image according to the main axis direction so as to align the main axis direction with a preset coordinate axis direction; S103, calculating gray level change characteristics along the direction perpendicular to the main axis direction in the target image, and generating a boundary response diagram highlighting a compression joint boundary; S104, selecting pixel points with high boundary response intensity from the boundary response graph as candidate point sets; S105, performing straight line fitting on the candidate point set to obtain an upper boundary straight line and a lower boundary straight line respectively; S106, calculating the distance between the two boundary straight lines to determine the actual physical size of the crimping area. Further, in the crimp region size measurement method, the S101 includes: S1011, inputting a crimping terminal image to be measured into a crimping region detection model to obtain a positioning result of a crimping region; S1012, cutting the crimping terminal image according to the positioning result to obtain a target image. Further, in the crimp region size measurement method, after S103 and before S104, the method further includes: And S103.5, carrying out enhancement processing on the boundary response graph so as to strengthen continuous boundary response. Further, in the crimp region size measurement method, the S104 includes: s1041, selecting pixel points with boundary response intensity larger than a preset intensity threshold value as candidate point sets in the boundary response graph. Further, in the crimp region size measurement method, the S105 includes: S1051, performing straight line fitting on the candidate point set by adopting a random sampling consistency algorithm to respectively obtain an upper boundary straight line and a lower boundary straight line. Further, in the crimp region size measurement method, the S106 includes: s1061, calculating the distance between two boundary straight lines to serve as the pixel size of the crimping area; S1062, combining calibration parameters of the imaging system, and converting the pixel size into an actual physical size. Further, in the crimp region size measureme