CN112284258A - System for measuring cable structure size parameters based on machine vision algorithm - Google Patents
System for measuring cable structure size parameters based on machine vision algorithm Download PDFInfo
- Publication number
- CN112284258A CN112284258A CN202011547475.4A CN202011547475A CN112284258A CN 112284258 A CN112284258 A CN 112284258A CN 202011547475 A CN202011547475 A CN 202011547475A CN 112284258 A CN112284258 A CN 112284258A
- Authority
- CN
- China
- Prior art keywords
- cable
- unit
- image
- data processing
- measured
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 63
- 238000012634 optical imaging Methods 0.000 claims abstract description 25
- 239000004020 conductor Substances 0.000 claims abstract description 17
- 238000005286 illumination Methods 0.000 claims abstract description 13
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 5
- 230000009191 jumping Effects 0.000 claims description 4
- 238000005259 measurement Methods 0.000 abstract description 32
- 238000000034 method Methods 0.000 abstract description 28
- 238000000605 extraction Methods 0.000 abstract description 9
- 239000011159 matrix material Substances 0.000 description 24
- 238000001914 filtration Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 12
- 238000004590 computer program Methods 0.000 description 7
- 230000009466 transformation Effects 0.000 description 6
- 238000003708 edge detection Methods 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 239000002184 metal Substances 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 230000001131 transforming effect Effects 0.000 description 2
- 238000013142 basic testing Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000009413 insulation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/02—Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
- G01B11/06—Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness for measuring thickness ; e.g. of sheet material
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/08—Measuring arrangements characterised by the use of optical techniques for measuring diameters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Quality & Reliability (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention provides a system for measuring structural dimension parameters of a cable based on a machine vision algorithm, which adopts an illumination unit to illuminate a cable sample to be measured, a position control unit controls the sample to rotate and jump, an optical imaging unit acquires moving image information of the cable sample to be measured and transmits the image information to a data processing unit, the data processing unit calculates the structural dimension parameters of the sample according to the received image information, the method adopts a sub-pixel edge extraction and fitting algorithm to calculate the diameter parameters of a cable profile, a matching algorithm is used to calculate the thickness parameters of the cable profile, and an area filling method is used to calculate the number of conductor cores of the cable. The system and the method can accurately, quickly and comprehensively measure the structural dimension parameters of the cable, the maximum thickness of a tested cable sample can reach 10cm, the measurement time of the structural dimension parameters of the cable is greatly shortened, the measurement efficiency of the structural dimension parameters of the cable is improved, the measurement procedures are saved, and the labor intensity is reduced.
Description
Technical Field
The present invention relates to the field of cable parameter measurement, and more particularly, to a system for measuring dimensional parameters of a cable structure based on a machine vision algorithm.
Background
The measurement of the dimensional parameters of the cable structure is a necessary item for the cable inspection and the spot inspection, and is also one of the most basic test items for finding the defects of the cable manufacturing quality. The measurement of the size parameters of the cable structure is carried out, the defect of the manufacturing quality of the cable is easily found, the quality of the cable entering a network can be effectively improved, and the long-term safe operation of the cable is ensured. The cable structure dimension measurement parameters mainly comprise: the cable structure comprises a cable structure outline diameter parameter, a cable structure thickness parameter and the number of cable metal conductor cores. At present, when the dimensional parameters of the cable structure are measured, the cable is opened layer by layer to sample for parameter measurement mainly by means of instruments or manual modes, the experience of testing personnel is seriously relied on, the measurement work is complicated, the measurement time is long, the measurement error is large, and the precision is difficult to guarantee. Therefore, each link of cable manufacturing, detection, operation and the like has urgent need for an integrated intelligent measurement system for the structural dimension parameters of the cable, which has the advantages of non-contact, high precision and high speed.
With the increasing promotion of technologies related to image acquisition such as high-definition lenses, optical imaging and motion control and the increasing perfection of machine vision algorithms such as image denoising, edge detection, image segmentation and recognition, the image is used as a carrier for information transmission, and the measurement of the structural size of an imaging image of an object plays an important role in the field of modern industrial detection according to the principle of vision and a digital image processing technology. Image measurement technology based on machine vision has been practically applied in the application fields of machine manufacturing, communication, national defense, aerospace and the like. Due to the fact that the cable structure is large in size range span and high in requirements for measurement accuracy of structural parameters such as insulation thickness and shielding thickness, the measurement method disclosed by the existing technical literature is low in measurement accuracy, few in measurement parameters, low in measurement speed and high in measurement cost, and is not suitable for measuring the cable structure size parameters with the large number of structural layers, the large parameter span and the high accuracy requirements.
Disclosure of Invention
In order to solve the technical problems that in the prior art, the cable is opened layer by layer to sample for parameter measurement by means of instruments or manual methods, the experience of testers is seriously relied on, the measurement work is complicated, the measurement time is long, the measurement error is large, and the precision is difficult to ensure, the invention provides a system for measuring the structural dimension parameters of the cable based on a machine vision algorithm, which comprises:
the optical imaging unit is connected with the data processing unit at one end and the position control unit at the other end, and is used for collecting image information of the cable sample to be measured placed in the position control unit and transmitting the image information to the data processing unit when the illumination unit illuminates the cable sample to be measured;
the position control unit is connected with the data processing unit at one end and the optical imaging unit at the other end and used for jumping and rotating the cable sample to be measured according to a second instruction of the data processing unit;
the data processing unit is respectively connected with the optical imaging unit, the illuminating unit and the position control unit and is used for outputting a first instruction to control the illuminating unit, outputting a second instruction to control the cable sample to be measured placed on the position control unit to jump and rotate, and calculating the structural size parameter of the cable sample to be measured according to the image information transmitted by the optical imaging unit;
an illumination unit connected with the data processing unit and used for illuminating the cable sample to be measured placed on the position control unit according to a first instruction of the data processing unit, wherein the illumination unit comprises:
the annular light source is connected with the light source controller and used for illuminating a cable sample to be measured according to the instruction of the light source controller;
and one end of the light source controller is connected with the annular light source, and the other end of the light source controller is connected with the data processing unit and used for controlling the working state of the annular light source according to the first instruction of the data processing unit.
Further, the system further comprises:
and the result output unit is used for generating a detection report of the structural dimension parameters of the cable sample to be measured according to the calculation result of the data processing unit, wherein the parameters comprise diameter parameters, thickness parameters and the number of conductor cores.
Further, the optical imaging unit includes:
one end of the telecentric lens is connected with the industrial camera, and the other end of the telecentric lens is connected with the position control unit and is used for amplifying the image of the cable sample to be measured;
and one end of the industrial camera is connected with the telecentric lens, and the other end of the industrial camera is connected with the data processing unit and is used for acquiring the image information of the cable sample image to be measured, which is amplified by the telecentric lens, and transmitting the image information to the data processing unit.
Further, the position control unit includes:
the motion control unit is connected with the data processing unit at one end and connected with the object driving unit at the other end, and is used for receiving a second instruction of the data processing unit and outputting a signal to the object driving unit to enable the object driving unit to act;
the object driving unit is connected with the motion control unit at one end and connected with the position measuring unit at the other end, and is used for receiving the output signal of the motion control unit to move and driving the position measuring unit connected with the object driving unit to jump and rotate;
and one end of the position measuring unit is connected with the object driving unit, and the other end of the position measuring unit is connected with the optical imaging unit and is used for bearing the cable sample to be measured and driving the cable sample to be measured to bounce and rotate through the self-movement.
According to another aspect of the invention, the invention provides a method for measuring dimensional parameters of a cable structure based on a machine vision algorithm, the method comprising:
under the irradiation of the lighting unit, when the position control unit drives the cable sample to be measured to move, the optical imaging unit amplifies the cable sample to be measured and generates image information, a cross-section small-field image of the cable sample to be measured is obtained according to the image information, and the cross-section small-field image is transmitted to the data processing unit;
the data processing unit selects any one of the small-field cross-section images as a reference image, extracts feature points of the reference image and an image to be spliced, matches the feature points of the reference image and the image to be spliced, splices the small-field cross-section images, and obtains a first cable cross-section outline image, wherein the image to be spliced is an image except the reference image in the small-field cross-section images;
filtering the first cable section contour image, simultaneously keeping contour edge details, and performing binarization processing on the filtered image to generate a second cable section contour image;
performing sub-pixel edge extraction on the second cable section outline image to generate a third cable section outline image;
and calculating the structural dimension parameters of the cable sample to be measured according to the data of the third cable section profile image, wherein the structural dimension parameters comprise diameter parameters, thickness parameters and conductor wire core number.
Further, the data processing unit selects any one of the small-field-of-view cross-section images as a reference image, extracts feature points of the reference image and an image to be spliced, matches the feature points of the reference image and the image to be spliced, and splices the small-field-of-view cross-section images to obtain a first cable cross-section contour image, and the method includes:
constructing a scale space for the small-field-of-view cross-section image by adopting a Hessian matrix, and generating stable edge points of the image to realize feature extraction of multiple scales, wherein the Hessian matrix expression of each pixel in the small-field-of-view cross-section image is as follows:
in the formula,the function representing the image is a function of,、、as a function of the imageAbout、The second derivative of the direction;
judging the local maximum value by adopting a Hessian matrix discriminant, obtaining the brightest or darkest point in the local area, and determining the brightest or darkest point as the position of the feature point, wherein the Hessian matrix discriminant is as follows:
wherein,for the two eigenvalues of the Hessian matrix,is the determinant of the Hessian matrix,changing a Hessian matrix into a determinant of a diagonal matrix M through row and column;
counting Haar wavelets around the characteristic points, and selecting the direction with the largest sum of wavelet characteristics as a main direction;
adopting RANSAC algorithm to solve the perspective transformation matrix of the feature points to be paired, and converting each image to be spliced into the coordinate system of the reference image through the perspective transformation matrix to realize image registration, wherein the pixel coordinate of the feature point in the coordinate system of each image to be spliced is the same as that of the feature point in the coordinate system of the reference imageCorresponding feature point pixel coordinates under a reference image coordinate systemThe following corresponding relations exist:
fusing all images to be spliced after perspective transformation matrix conversion with a reference image to generate a first cable section outline image, wherein for the condition that the splicing edge is discontinuous during image splicing, a weighted fusion method is adopted, and for the pixel values of the image overlapping area, the pixel values in the reference image and the images to be spliced are respectively synthesized according to a certain weight, and the calculation formula is as follows:
in the formula,for the pixel values of the stitched image,is the value of a pixel of the reference image,is the pixel value of the image to be stitched,andand the weight value is a corresponding weight value, and the weight value can be distributed according to the distance between the pixel point and the boundary of the two images.
Further, filtering the first cable section contour image while preserving contour edge details, and performing binarization processing on the filtered image to generate a second cable section contour image includes:
filtering the first cable section outline image by adopting a guide filtering method, and reserving edge details of the first cable section outline image during filtering, wherein the guide image is determined by adopting least square fittingAnd the filtered outputA local linear model of which the cost function is
In the formulaRespectively a guide image and an input image,is an index of a pixel, and,is a parameter of the regularization that,andrespectively a guide imageAt the windowThe mean and the variance within the range are,is a windowThe total number of the internal elements is,for inputting imagesAt the windowMean of the inner values;
and filtering the first cable section contour image based on the local linear model, performing binarization processing on the filtered image, and only keeping black and white color information in the image to generate a second cable section contour image.
Further, performing sub-pixel edge extraction on the second cable cross-sectional profile image to generate a third cable cross-sectional profile image comprises:
calculating local gradient module values point by point for the second cable section contour image by adopting a Sobel edge detection method, taking the maximum value in the module values as the gradient value of the point, recording the gradient direction of a template corresponding to the maximum value as the gradient direction of the point, and generating a gradient image with direction information, wherein the formula for calculating the local gradient module values is as follows:
in the formulaFor image partsThe regions sequentially increase the numbered 9 point pixel values from left to right and from top to bottom;
determining the sub-pixel position of each edge pixel point in the gradient image by adopting a Zernike moment sub-pixel edge detection method to generate a third cable section contour image, wherein for each edge pixel point, the rotation invariance of the Zernike moment of the image is utilized to calculate the gray level step heightBackground gray scale levelAnd perpendicular distance from center to edgeAnd combining said parametersAndrespectively with the set thresholdAndperforming a comparison to generate a comparison result, when the comparison result is satisfiedAccording to said parametersAnddetermines the exact sub-pixel location of each edge point.
Further, calculating the structural dimension parameter of the cable sample to be measured according to the data of the third cable cross-sectional profile image comprises:
calculating a diameter parameter of the cable sample to be measured based on the data of the third cable cross-sectional profile image, wherein:
step 1, based on the third cable section outline imageCalculating to obtain a rough contour fitting circle by using edge pointsCenter of circleAnd diameterWherein,,is a natural number, and is provided with a plurality of groups,andthe initial values of (a) are all 1;
step 2, calculating all edge points in the third cable section contour imageTo the center of the fitted circle of the rough contourIs a distance ofDeterminingDifference of andand generating a difference set;
Step 3, filtering out difference valuesCollectionGenerating difference value set by the points of which the median difference value elements are larger than the set distance difference threshold valueAnd according to said set of differencesCalculating the arithmetic mean deviation of the contour,,Is a natural number;
step 4, according to the average deviationTo center of circle coordinate、And diameterDetermining a new center of a circle by the partial derivative functionAnd diameter;
Step 5, according to the coordinates of the circle centerAndcomputingAccording to the centre coordinates of the circleAnd calculatingAccording to diameterAndcomputingThe calculation formula is as follows:
step 6, when、Andall are smaller than a set error threshold value, the diameterThe diameter parameter of a cable sample to be measured is obtained; when in use、Andany one of which is greater than the set error threshold, andwhen it is used, orderReturning to the step 2; when in use、Andany one of which is greater than the set error threshold, andwhen it is used, order,Returning to step 1, wherein, the third cable section outline imageEach edge point comprises an edge point of the third cable section outline image selected in the last iteration;
setting the outer layer profile as N and the inner layer profile as M for the profile of the sample to be measured in the third cable section profile image, and calculating the thickness parameter of the cable sample to be measured based on search matching, wherein:
selecting a points from N, searching a matching point with the shortest distance on M in a certain area of the point from any point, traversing the a points from N, recording the matching point of each point, and storing the matching points in a set P, wherein a is a natural number;
selecting a points from M, searching a matching point which is in a certain area of the point and has the shortest distance on N from any point, traversing the a points on M, recording the matching point of each point, and storing the matching points in a set Q, wherein a is a natural number;
comparing the matching point pairs in the set P and the set Q, selecting the point pair with the same two points in each point pair as the matching point pair, and storing all the successfully matched point pairs into the set;
respectively calculating the distance between each matching point pair for the successfully matched point pairs in the set, and storing the distance to the setPerforming the following steps;
computing collectionsTaking the maximum value, the minimum value and the average value of the distances among all the matching point pairs as the maximum value, the minimum value and the average value of the thickness;
and calculating the number of conductor wire cores of the cable sample to be measured, wherein the calculation formula is as follows:
in the formula,is the approximate number of metal conductor cores of the cable sample to be measured,is the total pixel area of the conductor area in the third cable cross-sectional profile image,and the area of a pixel corresponding to a single conductor in the third cable section outline image.
The system adopts an illumination unit to illuminate a cable sample to be measured, a position control unit controls the sample to rotate and jump, an optical imaging unit acquires moving image information of the cable sample to be measured and transmits the image information to a data processing unit, the data processing unit calculates the structural dimension parameter of the sample according to the received image information, the method adopts a sub-pixel edge extraction and fitting algorithm to calculate the diameter parameter of the cable profile, a matching algorithm is used to calculate the thickness parameter of the cable profile, and an area filling method is used to calculate the number of conductor cores of the cable. The system and the method can accurately, quickly and comprehensively measure the structural size parameters of the cable, the maximum thickness of a tested cable sample can reach 10cm, compared with the measurement of a cable slice sample in the prior art, the plastic deformation of the sample is reduced, and the measurement precision can be improved; by splicing the local small-field images of the cable, the resolution of a single pixel of the image can be improved, and the measurement precision is further improved; can accomplish the cable profile diameter parameter automatically, thickness parameter and conductor sinle silk radical are measured, compare with prior art, measuring error is little, the cable structure dimensional parameter of measurement is more comprehensive, the measurement process is accomplished by the system is automatic, avoid artifical the participation, can accomplish cable structure dimensional parameter in 1 minute and measure, the measurement process is rapider, the cable structure dimensional parameter measuring time has greatly been reduced, avoid successive layer sample and measurement, the measurement efficiency of cable structure dimensional parameter has been improved, the measurement process has been saved, labor intensity is reduced.
Drawings
A more complete understanding of exemplary embodiments of the present invention may be had by reference to the following drawings in which:
FIG. 1 is a schematic structural diagram of a system for measuring dimensional parameters of a cable structure based on a machine vision algorithm according to a preferred embodiment of the present invention;
FIG. 2 is a flow chart of a method for measuring dimensional parameters of a cable structure based on a machine vision algorithm in accordance with a preferred embodiment of the present invention;
FIG. 3 is a cross-sectional small field-of-view image block diagram of a cable sample to be measured in accordance with a preferred embodiment of the present invention;
fig. 4 is a block diagram of the stitching of small field-of-view images of a cable cross-section to form a complete cable profile image in accordance with a preferred embodiment of the present invention.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
Fig. 1 is a schematic structural diagram of a system for measuring dimensional parameters of a cable structure based on a machine vision algorithm according to a preferred embodiment of the present invention. As shown in fig. 1, the system 100 for measuring the dimensional parameters of the cable structure based on the machine vision algorithm according to the preferred embodiment includes:
and an optical imaging unit 101, one end of which is connected to the data processing unit 104 and the other end of which is connected to the position control unit 103, for collecting image information of the cable sample to be measured placed on the position control unit 103 and transmitting the image information to the data processing unit 104 when the illumination unit 102 illuminates the cable sample to be measured.
Preferably, the optical imaging unit 101 includes:
a telecentric lens 111, one end of which is connected with the industrial camera 112 and the other end is connected with the position control unit 103, and is used for amplifying the image of the cable sample to be measured;
and the industrial camera 112 is connected with the telecentric lens 111 at one end and the data processing unit 104 at the other end, and is used for acquiring the image information of the cable sample image to be measured, which is amplified by the telecentric lens, and transmitting the image information to the data processing unit 104.
The optical imaging unit adopts a telecentric lens to amplify the cable sample to be measured and provide superior image quality, and the industrial camera can stably and efficiently acquire image information, so that the accuracy of the image information source of the cable sample to be measured is improved, and accurate image information is provided for calculating the size parameters of the cable structure.
And the illumination unit 102 is connected with the data processing unit 104 and is used for illuminating the cable sample to be measured placed on the position control unit 103 according to a first instruction of the data processing unit 104.
Preferably, the lighting unit 102 comprises:
the annular light source 121 is connected with the light source controller 122 and is used for illuminating a cable sample to be measured according to the instruction of the light source controller 122;
and a light source controller 122, one end of which is connected to the annular light source 121, and the other end of which is connected to the data processing unit 104, for controlling the working state of the annular light source according to the first instruction of the data processing unit.
The annular light source can provide high-brightness and high-directivity illumination, and the accuracy of the annular light source for illuminating the cable sample to be measured is further improved by controlling the working state of the annular light source through the light source controller.
And a position control unit 103, one end of which is connected with the data processing unit 104 and the other end of which is connected with the optical imaging unit 101, for jumping and rotating the cable sample to be measured according to a second instruction of the data processing unit 104.
Preferably, the position control unit 103 includes:
a motion control unit 131, one end of which is connected to the data processing unit 104 and the other end of which is connected to the object driving unit 132, for receiving the second instruction of the data processing unit 104 and outputting a signal to the object driving unit 132 to operate the object driving unit 132;
an object driving unit 132, one end of which is connected to the motion control unit 131 and the other end of which is connected to the position measuring unit 133, for receiving the output signal of the motion control unit 132 to move and driving the position measuring unit 133 connected thereto to jump and rotate;
and a position measuring unit 133, one end of which is connected to the object driving unit 132 and the other end of which is connected to the optical imaging unit 101, for carrying the cable sample to be measured and driving the cable sample to be measured to jump and rotate by its own motion.
The object driving unit consists of a motor and a driver, and when the driver receives a control signal of the motion control unit, the motor is controlled to move, so that the position measuring unit connected with the motor is driven to move. The position measuring unit is a working platform and is used for bearing a cable sample to be measured, the cable sample to be measured is driven to jump and rotate through the self-movement of the position measuring unit, the scale size is marked on the table top, and the structural size of the cable can be roughly estimated.
And the data processing unit 104 is connected with the optical imaging unit 101, the illuminating unit 102 and the position control unit 103 respectively, and is used for outputting a first instruction to control the illuminating unit 102, outputting a second instruction to control the cable sample to be measured placed on the position control unit 103 to jump and rotate, and calculating the structural dimension parameters of the cable sample to be measured according to the image information transmitted by the optical imaging unit 101.
And the result output unit 105 is used for generating a detection report of the structural dimension parameters of the cable sample to be measured according to the calculation result of the data processing unit, wherein the parameters comprise a diameter parameter, a thickness parameter and the number of conductor cores.
Fig. 2 is a flow chart of a method for measuring dimensional parameters of a cable structure based on a machine vision algorithm according to a preferred embodiment of the present invention. As shown in fig. 2, the method for measuring the dimensional parameters of the cable structure based on the machine vision algorithm according to the preferred embodiment starts with step 200.
In step 201, under the irradiation of the illumination unit, when the position control unit drives the cable sample to be measured to move, the optical imaging unit amplifies the cable sample to be measured and generates image information, a cross-section small-field image of the cable sample to be measured is obtained according to the image information, and the cross-section small-field image is transmitted to the data processing unit.
Fig. 3 is a cross-sectional small field image structure diagram of a cable sample to be measured according to a preferred embodiment of the present invention. As shown in fig. 3, when the cable sample to be measured is illuminated by the illumination unit, and the cable sample to be measured is driven by the position control unit to move, the optical imaging unit amplifies the sample and generates a plurality of cross-sectional small-field images of the sample, where the structure in each cross-sectional small-field image is different.
In step 202, the data processing unit selects any one of the cross-section small-field images as a reference image, extracts feature points of the reference image and an image to be spliced, matches the feature points of the reference image and the image to be spliced, and splices the cross-section small-field images to obtain a first cable cross-section contour image, wherein the image to be spliced is an image of the cross-section small-field images except for the reference image.
Preferably, the data processing unit selects any one of the cross-section small-field images as a reference image, extracts feature points of the reference image and an image to be spliced, matches the feature points of the reference image and the image to be spliced, and splices the cross-section small-field images to obtain a first cable cross-section contour image, where:
constructing a scale space for the small-field-of-view cross-section image by adopting a Hessian matrix, and generating stable edge points of the image to realize feature extraction of multiple scales, wherein the Hessian matrix expression of each pixel in the small-field-of-view cross-section image is as follows:
in the formula,the function representing the image is a function of,、、as a function of the imageAbout、The second derivative of the direction;
judging the local maximum value by adopting a Hessian matrix discriminant, obtaining the brightest or darkest point in the local area, and determining the brightest or darkest point as the position of the feature point, wherein the Hessian matrix discriminant is as follows:
wherein,for the two eigenvalues of the Hessian matrix,is the determinant of the Hessian matrix,changing a Hessian matrix into a determinant of a diagonal matrix M through row and column;
counting Haar wavelets around the characteristic points, and selecting the direction with the largest sum of wavelet characteristics as a main direction;
adopting RANSAC algorithm to solve the perspective transformation matrix of the feature points to be paired, and converting each image to be spliced into the coordinate system of the reference image through the perspective transformation matrix to realize image registration, wherein the pixel coordinate of the feature point in the coordinate system of each image to be spliced is the same as that of the feature point in the coordinate system of the reference imageCorresponding feature point pixel coordinates under a reference image coordinate systemThe following corresponding relations exist:
fusing all images to be spliced after perspective transformation matrix conversion with a reference image to generate a first cable section outline image, wherein for the condition that the splicing edge is discontinuous during image splicing, a weighted fusion method is adopted, and for the pixel values of the image overlapping area, the pixel values in the reference image and the images to be spliced are respectively synthesized according to a certain weight, and the calculation formula is as follows:
in the formula,for the pixel values of the stitched image,is the value of a pixel of the reference image,is the pixel value of the image to be stitched,andand the weight value is a corresponding weight value, and the weight value can be distributed according to the distance between the pixel point and the boundary of the two images.
Fig. 4 is a block diagram of the stitching of small field-of-view images of a cable cross-section to form a complete cable profile image in accordance with a preferred embodiment of the present invention. As shown in fig. 4, a complete cable cross-section contour image is obtained by selecting a reference image and a spliced image, extracting feature points of the reference image and the image to be spliced, and matching the reference image and the image to be spliced on the cross-section small-field images of the plurality of cable samples to be measured in fig. 3.
In step 203, the first cable section contour image is filtered while preserving contour edge details, and the filtered image is subjected to binarization processing to generate a second cable section contour image.
Preferably, the filtering the first cable cross-section contour image while preserving contour edge details, and the binarizing the filtered image to generate a second cable cross-section contour image includes:
filtering the first cable section outline image by adopting a guide filtering method, and reserving edge details of the first cable section outline image during filtering, wherein the guide image is determined by adopting least square fittingAnd the filtered outputA local linear model of which the cost function is
In the formulaRespectively a guide image and an input image,is an index of a pixel, and,is a parameter of the regularization that,andrespectively a guide imageAt the windowThe mean and the variance within the range are,is a windowThe total number of the internal elements is,for inputting imagesAt the windowMean of the inner values;
and filtering the first cable section contour image based on the local linear model, performing binarization processing on the filtered image, and only keeping black and white color information in the image to generate a second cable section contour image.
The guiding filtering method has good retention of the edge characteristics of the complete cable section outline image, can retain the outline edge details while filtering the spliced image, can restore the outline image of the cable sample to the maximum extent, and has better image restoration effect. And the binarization processing of the image facilitates the extraction of information in the image, thereby increasing the recognition efficiency when computer recognition is carried out.
In step 204, sub-pixel edge extraction is performed on the second cable cross-sectional profile image to generate a third cable cross-sectional profile image.
Preferably, the sub-pixel edge extraction of the second cable cross-section profile image to generate a third cable cross-section profile image comprises:
calculating local gradient module values point by point for the second cable section contour image by adopting a Sobel edge detection method, taking the maximum value in the module values as the gradient value of the point, recording the gradient direction of a template corresponding to the maximum value as the gradient direction of the point, and generating a gradient image with direction information, wherein the formula for calculating the local gradient module values is as follows:
in the formulaFor image partsThe regions sequentially increase the numbered 9 point pixel values from left to right and from top to bottom;
using Zernike moment sub-pixel edgesDetermining the sub-pixel position of each edge pixel point in the gradient image by an edge detection method to generate a third cable section outline image, wherein the gray level step height is calculated by utilizing the Zernike moment rotation invariance of the image for each edge pixel pointBackground gray scale levelAnd perpendicular distance from center to edgeAnd combining said parametersAndrespectively with the set thresholdAndperforming a comparison to generate a comparison result, when the comparison result is satisfiedAccording to said parametersAnddetermines the exact sub-pixel location of each edge point.
In step 205, calculating structural dimension parameters of the cable sample to be measured according to the data of the third cable cross-section profile image, wherein the structural dimension parameters comprise a diameter parameter, a thickness parameter and the number of conductor cores.
Preferably, calculating the structural dimension parameter of the cable sample to be measured from the data of the third cable cross-sectional profile image comprises:
calculating a diameter parameter of the cable sample to be measured based on the data of the third cable cross-sectional profile image, wherein:
step 1, based on the third cable section outline imageCalculating to obtain the center of the fitting circle of the rough contour by each edge pointAnd diameterWherein,,is a natural number, and is provided with a plurality of groups,andthe initial values of (a) are all 1;
step 2, calculating all edge points in the third cable section contour imageTo the center of the fitted circle of the rough contourIs a distance ofDeterminingDifference of andand generating a difference set;
Step 3, filtering the difference value setGenerating difference value set by the points of which the median difference value elements are larger than the set distance difference threshold valueAnd according to said set of differencesCalculating the arithmetic mean deviation of the contour,,Is a natural number;
step 4, according to the average deviationTo center of circle coordinate、And diameterDetermining a new center of a circle by the partial derivative functionAnd diameter;
Step 5, according to the coordinates of the circle centerAndcomputingAccording to the centre coordinates of the circleAnd calculatingAccording to diameterAndcomputingThe calculation formula is as follows:
step 6, when、Andall are smaller than a set error threshold value, the diameterThe diameter parameter of a cable sample to be measured is obtained; when in use、Andany one of which is greater than the set error threshold, andwhen it is used, orderReturning to the step 2; when in use、Andany one of which is greater than the set error threshold, andwhen it is used, order,Returning to step 1, wherein, the third cable section outline imageEach edge point comprises an edge point of the third cable section outline image selected in the last iteration;
setting the outer layer profile as N and the inner layer profile as M for the profile of the sample to be measured in the third cable section profile image, and calculating the thickness parameter of the cable sample to be measured based on search matching, wherein:
selecting a points from N, searching a matching point with the shortest distance on M in a certain area of the point from any point, traversing the a points from N, recording the matching point of each point, and storing the matching points in a set P, wherein a is a natural number;
selecting a points from M, searching a matching point which is in a certain area of the point and has the shortest distance on N from any point, traversing the a points on M, recording the matching point of each point, and storing the matching points in a set Q, wherein a is a natural number;
comparing the matching point pairs in the set P and the set Q, selecting the point pair with the same two points in each point pair as the matching point pair, and storing all the successfully matched point pairs into the set;
respectively calculating the distance between each matching point pair for the successfully matched point pairs in the set, and storing the distance to the setPerforming the following steps;
computing collectionsTaking the maximum value, the minimum value and the average value of the distances among all the matching point pairs as the maximum value, the minimum value and the average value of the thickness;
and calculating the number of conductor wire cores of the cable sample to be measured, wherein the calculation formula is as follows:
in the formula,is the approximate number of metal conductor cores of the cable sample to be measured,is the total pixel area of the conductor area in the third cable cross-sectional profile image,and the area of a pixel corresponding to a single conductor in the third cable section outline image.
The invention has been described with reference to a few embodiments. However, other embodiments of the invention than the one disclosed above are equally possible within the scope of the invention, as would be apparent to a person skilled in the art from the appended patent claims.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a/an/the [ device, component, etc ]" are to be interpreted openly as referring to at least one instance of said device, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.
Claims (4)
1. A system for measuring dimensional parameters of a cable structure based on machine vision algorithms, the system comprising:
the optical imaging unit is connected with the data processing unit at one end and the position control unit at the other end, and is used for collecting image information of the cable sample to be measured placed in the position control unit and transmitting the image information to the data processing unit when the illumination unit illuminates the cable sample to be measured, wherein the thickness of the cable sample to be measured is not more than 10 cm;
the position control unit is connected with the data processing unit at one end and the optical imaging unit at the other end and used for jumping and rotating the cable sample to be measured according to a second instruction of the data processing unit;
the data processing unit is respectively connected with the optical imaging unit, the illuminating unit and the position control unit and is used for outputting a first instruction to control the illuminating unit, outputting a second instruction to control the jumping and rotation of a cable sample to be measured placed in the position control unit and calculating the structural size parameter of the cable sample to be measured according to image information transmitted by the optical imaging unit, wherein the parameter comprises a diameter parameter, a thickness parameter and the number of conductor cores; and
an illumination unit connected with the data processing unit and used for illuminating the cable sample to be measured placed on the position control unit according to a first instruction of the data processing unit, wherein the illumination unit comprises:
the annular light source is connected with the light source controller and used for illuminating a cable sample to be measured according to the instruction of the light source controller;
and one end of the light source controller is connected with the annular light source, and the other end of the light source controller is connected with the data processing unit and used for controlling the working state of the annular light source according to the first instruction of the data processing unit.
2. The system of claim 1, further comprising:
and the result output unit is used for generating a detection report of the structural dimension parameters of the cable sample to be measured according to the calculation result of the data processing unit.
3. The system of claim 2, wherein the optical imaging unit comprises:
one end of the telecentric lens is connected with the industrial camera, and the other end of the telecentric lens is connected with the position control unit and is used for amplifying the image of the cable sample to be measured;
and one end of the industrial camera is connected with the telecentric lens, and the other end of the industrial camera is connected with the data processing unit and is used for acquiring the image information of the cable sample image to be measured, which is amplified by the telecentric lens, and transmitting the image information to the data processing unit.
4. The system of claim 2, wherein the position control unit comprises:
the motion control unit is connected with the data processing unit at one end and connected with the object driving unit at the other end, and is used for receiving a second instruction of the data processing unit and outputting a signal to the object driving unit to enable the object driving unit to act;
the object driving unit is connected with the motion control unit at one end and connected with the position measuring unit at the other end, and is used for receiving the output signal of the motion control unit to move and driving the position measuring unit connected with the object driving unit to jump and rotate;
and one end of the position measuring unit is connected with the object driving unit, and the other end of the position measuring unit is connected with the optical imaging unit and is used for bearing the cable sample to be measured and driving the cable sample to be measured to bounce and rotate through the self-movement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011547475.4A CN112284258B (en) | 2020-12-24 | 2020-12-24 | System for measuring cable structure size parameters based on machine vision algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011547475.4A CN112284258B (en) | 2020-12-24 | 2020-12-24 | System for measuring cable structure size parameters based on machine vision algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112284258A true CN112284258A (en) | 2021-01-29 |
CN112284258B CN112284258B (en) | 2021-04-02 |
Family
ID=74426607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011547475.4A Active CN112284258B (en) | 2020-12-24 | 2020-12-24 | System for measuring cable structure size parameters based on machine vision algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112284258B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114216912A (en) * | 2022-02-22 | 2022-03-22 | 常州海图电子科技有限公司 | Machine vision-based traction steel wire rope defect detection method |
CN115601315A (en) * | 2022-10-09 | 2023-01-13 | 江阴市千里马电工材料有限公司(Cn) | Shadow frame data processing device for wrapping silicon rubber cable |
CN115854897A (en) * | 2022-12-27 | 2023-03-28 | 东莞诺丹舜蒲胶辊有限公司 | Rubber roller laser intelligent detection method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1385122A1 (en) * | 2002-07-24 | 2004-01-28 | Fanuc Ltd | Object taking-out apparatus |
CN101398291A (en) * | 2007-09-25 | 2009-04-01 | 宝山钢铁股份有限公司 | Band steel tracking imaging vision detection method |
CN102353349A (en) * | 2011-09-30 | 2012-02-15 | 广东工业大学 | Machine vision based micro-sound film concentricity online testing system and testing method |
CN102680849A (en) * | 2012-05-29 | 2012-09-19 | 河海大学常州校区 | Cable sequence identification method and equipment based on machine vision and fuzzy control |
-
2020
- 2020-12-24 CN CN202011547475.4A patent/CN112284258B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1385122A1 (en) * | 2002-07-24 | 2004-01-28 | Fanuc Ltd | Object taking-out apparatus |
CN101398291A (en) * | 2007-09-25 | 2009-04-01 | 宝山钢铁股份有限公司 | Band steel tracking imaging vision detection method |
CN102353349A (en) * | 2011-09-30 | 2012-02-15 | 广东工业大学 | Machine vision based micro-sound film concentricity online testing system and testing method |
CN102680849A (en) * | 2012-05-29 | 2012-09-19 | 河海大学常州校区 | Cable sequence identification method and equipment based on machine vision and fuzzy control |
Non-Patent Citations (1)
Title |
---|
代娜: "基于机器视觉的小型规则零件二维尺寸测量研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114216912A (en) * | 2022-02-22 | 2022-03-22 | 常州海图电子科技有限公司 | Machine vision-based traction steel wire rope defect detection method |
CN115601315A (en) * | 2022-10-09 | 2023-01-13 | 江阴市千里马电工材料有限公司(Cn) | Shadow frame data processing device for wrapping silicon rubber cable |
CN115854897A (en) * | 2022-12-27 | 2023-03-28 | 东莞诺丹舜蒲胶辊有限公司 | Rubber roller laser intelligent detection method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN112284258B (en) | 2021-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112284258B (en) | System for measuring cable structure size parameters based on machine vision algorithm | |
CN109871895B (en) | Method and device for detecting defects of circuit board | |
WO2023077404A1 (en) | Defect detection method, apparatus and system | |
CN112348787B (en) | Training method of object defect detection model, object defect detection method and device | |
KR102166458B1 (en) | Defect inspection method and apparatus using image segmentation based on artificial neural network | |
CN103279765B (en) | Steel wire rope surface damage detection method based on images match | |
CN111583114B (en) | Automatic measuring device and measuring method for pipeline threads | |
CN111612737B (en) | Artificial board surface flaw detection device and detection method | |
CN105740910A (en) | Vehicle object detection method and device | |
CN107891012B (en) | Pearl size and circularity sorting device based on equivalent algorithm | |
JP2021515885A (en) | Methods, devices, systems and programs for setting lighting conditions and storage media | |
CN110334727B (en) | Intelligent matching detection method for tunnel cracks | |
CN111415339B (en) | Image defect detection method for complex texture industrial product | |
CN103884294B (en) | The method and its device of a kind of infrared light measuring three-dimensional morphology of wide visual field | |
CN114280075A (en) | Online visual inspection system and method for surface defects of pipe parts | |
CN113763384B (en) | Defect detection method and defect detection device in industrial quality inspection | |
CN105588440A (en) | Position detection method and device for sintering machine trolleys | |
Bhamare et al. | Quality inspection of tire using deep learning based computer vision | |
CN111178405A (en) | Similar object identification method fusing multiple neural networks | |
CN113970560A (en) | Defect three-dimensional detection method based on multi-sensor fusion | |
CN114549414A (en) | Abnormal change detection method and system for track data | |
CN106841231B (en) | Visual precision measurement system and method for tiny parts | |
CN115908952B (en) | High-speed railway tunnel fixture detection method based on improved YOLOv5 algorithm | |
CN110288565A (en) | Defect identification method, device and the storage medium of carbon fiber composite core wire | |
CN212646436U (en) | Artificial board surface flaw detection device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |