Parallel image measurement method oriented to the insulating layer thickness of a radial symmetrical cable section

10060726 ยท 2018-08-28

Assignee

Inventors

Cpc classification

International classification

Abstract

The present invention relates to a parallel image measurement method oriented to the insulating layer thickness of a radial symmetrical cable section. The method conducts the non-contact high-accuracy measurement based on the machine vision and the image analysis, adopts a GPU multi-core parallel platform for the high-speed measurement, extracts the useful information from the section image of the radial symmetrical cable, and then measures the insulating layer thickness. Compared with the prior art, the present patent can lower the time consumed for the accurate measurement, fill in the blank of the high-accuracy parallel image measurement of the insulating layer thickness of the radial symmetrical cable section in the domestic cable industry, break down the monopoly and technology blockade by related foreign manufacturers and improve the technology level of on-line testing of product quality in China, expedite the production automation progress of domestic manufacturer.

Claims

1. A parallel image measurement method oriented to an insulating layer thickness of a radial symmetrical cable section, the method comprising: an industrial CCD camera calibrating an image of the radial symmetrical cable section; conducting a non-contact high-accuracy measurement based on a machine vision and image analysis; a multi-thread multi-core processor performing a high-speed measurement; obtaining information from the image of the radial symmetrical cable section; and measuring the insulating layer thickness; wherein measuring the insulating layer thickness includes: obtaining an inner and an outer contour of the radial symmetrical cable section from the image and calculating a mass center of the cable section; pinpointing pixels of the inner contour to sub-pixels, connecting the mass center and the pixels of the inner contour and prolonging to the outer contour; piece-wise curve fitting the outer contour, obtaining a junction of the outer contour and an elongation line; obtaining a distance between the junction and the pixels of the inner contour, the distance being the insulating layer thickness corresponding to the pixels of the inner contour; and obtaining a maximum thickness, a minimum thickness, and an average thickness of the insulating layer of the radial symmetrical cable section.

2. The parallel image measurement method according to claim 1, wherein pinpointing the pixels of the inner contour and piece-wise curve fitting the outer contour are implemented by the multi-thread multi-core processor, the multi-thread multi-core processor implementing a B-spline curve fitting via parallel calculation.

3. The parallel image measurement method according to claim 2, wherein the multi-thread multi-core processor implementing the B-spline curve fitting includes: {circle around (1)} starting the multi-thread multi-core processor, allocating space in a display memory, and copying data to the display memory; {circle around (2)} defining a number of blocks and threads, spawning the threads, calling a kernel function, adopting the B-spline curve fitting to realize the pinpointing of the inner contour; {circle around (3)} defining the number of the blocks and the threads, spawning the threads, calling the kernel function, and using the mass center, points on the inner contour and a fitting function to obtain corresponding points on the outer contour; {circle around (4)} the display memory and the multi-thread multi-core processor transferring a calculated result to a CPU, and releasing resources on the display memory and the multi-thread multi-core processor.

4. The parallel image measurement method according to claim 1, wherein a value is identified from all candidate values of thickness as a final measured value to obtain the maximum and the minimum thickness.

5. The parallel image measurement method according to claim 4, wherein obtaining the minimum thickness comprises: (1) sequencing the obtained thickness of the insulating layer corresponding to each of the pixels of the inner contour in an ascending order; (2) taking N minimal values and corresponding 2D co-ordinates, marking the N minimal values and the 2D co-ordinates as set Tn; (3) for an ith minimum value of the N minimal values, defining a weight Wi=0; if a point q adjacent to the ith minimum value in the image is in Tn, and a sequencing interval of the ordered thickness does not exceed 10, then Wi++, and inactivating the adjacent point in TN; (4) performing steps (1)-(3) for all of the N minimum values in the ascending order, and if the Wi is greater than a certain threshold, a current Ti is the minimum thickness.

6. A parallel image measurement system for an insulating layer thickness of a radial symmetrical cable section, the system comprising: an industrial CCD camera, the camera is configured to calibrate an image of the radial symmetrical cable section; a CPU; and a multi-thread multi-core processor, wherein the CPU and the multi-thread multi-core processor are configured to conduct a non-contact high-accuracy measurement based on a machine vision and image analysis; perform a high-speed measurement; obtain information from the image of the radial symmetrical cable section; and measure the insulating layer thickness, wherein when the CPU and the multi-thread multi-core processor measure the insulating layer thickness, the CPU and the multi-thread multi-core processor are further configured to: obtain an inner and an outer contour of the radial symmetrical cable section from the image and calculate a mass center of the cable section; pinpoint pixels of the inner contour to sub-pixels, connect the mass center and the pixels of the inner contour and prolong to the outer contour; piece-wise curve fit the outer contour, obtain a junction of the outer contour and an elongation line; obtain a distance between the junction and the pixels of the inner contour, the distance being the insulating layer thickness corresponding to the pixels of the inner contour; and obtain a maximum thickness, a minimum thickness, and an average thickness of the insulating layer of the radial symmetrical cable section.

7. The parallel image measurement system of claim 6, wherein the multi-thread multi-core processor is configured to pinpoint the pixels of the inner contour and piece-wise curve fit the outer contour, and the multi-thread multi-core processor is configured to implement a B-spline curve fitting via parallel calculation.

8. The parallel image measurement system of claim 7, further comprising: a display memory, wherein when the multi-thread multi-core processor implements the B-spline curve fitting, the multi-thread multi-core processor is started, and the multi-thread multi-core processor and the display memory are configured to: allocate space in the display memory and copy data to the display memory; define a number of blocks and threads, spawn the threads, call a kernel function, adopt the B-spline curve fitting to pinpoint the inner contour; define the number of the blocks and the threads, spawn the threads, call the kernel function, and use the mass center, points on the inner contour, and a fitting function to obtain corresponding points on the outer contour; and transfer a calculated result to the CPU, and release resources on the display memory and the multi-thread multi-core processor.

9. The parallel image measurement system of claim 6, wherein the CPU and the multi-thread multi-core processor are configured to identify a value from all candidate values of thickness as a final measured value to obtain the maximum and the minimum thickness.

10. The parallel image measurement system of claim 9, wherein when the CPU and the multi-thread multi-core processor obtain the minimum thickness, the CPU and the multi-thread multi-core processor are configured to: (1) sequence the obtained thickness of the insulating layer corresponding to each of the pixels of the inner contour in an ascending order; (2) take N minimal values and corresponding 2D co-ordinates, mark the N minimal values and the 2D co-ordinates as set Tn; (3) for an ith minimum value of the N minimal values, define a weight Wi=0; if a point q adjacent to the ith minimum value in the image is in Tn, and a sequencing interval of the ordered thickness does not exceed 10, then Wi++, and inactivate the adjacent point in TN; (4) perform (1)-(3) for all of the N minimum values in the ascending order, and if the Wi is greater than a certain threshold, a current Ti is the minimum thickness.

Description

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

(1) FIG. 1 is a technical line map of the present invention;

(2) FIG. 2 is an organizational structure schematic diagram of the threads;

(3) FIG. 3 is a schematic diagram of a cable section.

DETAILED DESCRIPTION OF THE INVENTION

(4) The present invention will now be described in detail in connection with an embodiment of the present invention with reference to the accompanying drawings.

(5) Embodiment

(6) The difference from the existing measurement methods resides in that the present invention conducts the non-contact high-accuracy measurement based on the machine vision and the image analysis, adopts a GPU multi-core parallel platform for the high-speed measurement. It mainly considers how to extract the useful information from the section image of the radial symmetrical cable, and then measures the insulating layer thickness systematically, as shown in FIG. 1. The specific steps of the present invention are as follows:

(7) {circle around (1)} reading an image shot, calibrated by an industrial CCD camera;

(8) {circle around (2)} extracting an inner and an outer contour of a radial symmetrical cable section from the image, and calculating a mass center of the cable section;

(9) {circle around (3)} subjecting the pixels of the inner contour to the sub-pixel pinpointing, connecting the mass center and the pixels of the inner contour and prolonging to the outer contour;

(10) {circle around (4)} subjecting the outer contour to the piece-wise curve fitting and solving a junction of the outer contour and an elongation line;

(11) {circle around (5)} calculating the distance between the junction and the pixels of the inner contour, which will be the insulating layer thickness corresponding to the current pixels of the inner contour;

(12) {circle around (6)} adopting a statistical method to obtain the maximum thickness, the minimum thickness and the average thickness of the insulating layer of this radial symmetrical cable section

(13) The technology solution of the present invention is used by the quality inspectors of cable to obtain the measurement data of the insulating layer thickness via parallel calculation of the section image, specifically including the following:

(14) 1. Pinpointing of the pixels of the inner contour and piecewise fitting the outer contour based on a GPU platform

(15) (1) Rationale

(16) In consideration of the calculation capacity and performance of the hardware, a GPU parallel calculation model can be adopted to overcome the problems of too much time consumed and slow speed in the procedure of testing cable thickness, to enable a dramatic reduction of the time consumed in the testing procedure. The GPU (Graphics Processing Unit) is a highly parallel and multi-threading multi-core processor with a powerful computing capacity and a high band width. GPU parallel calculations can improve the performance of image processing dozens of times.

(17) The CUDA is a soft hardware system with a GPU as the data parallel calculation equipment, developed by C language and easy for learning and use. A CPU serves as a host to do strongly logical tasks and serial computing. The GPU serves as a device to do highly threaded parallel processing tasks. Adopting a CPU+GPU isomerical parallel processing can significantly lower the burden to the CPU, decrease the CPU system overhead, raise the whole throughput of the system, improve the computing capacity of the system and economize on the cost and energy resources. A GPU parallel algorithm is adopted in the procedure of testing cable thickness to overcome the problems of too much time consumed and slow speed of calculation. The organizational structure of the threads is as shown in FIG. 2.

(18) (2) Basic Steps

(19) The B-spline curve fitting method can only target one certain pixel on the contour in each calculation, and the one calculated is a sub-pixel edge position of an individual pixel. The sub-pixel positioning of the edge entails calculating whole pixels on the contour one by one, with higher positioning accuracy yet relatively slow speed. Besides, as the image adopts a resolution of 4092*4092, the quantity of pixels on the inner and outer contours becomes very large and the calculation consumes a lot of time. Adopting the GPU parallel calculation model can considerably shorten the time consumed in this procedure. The main steps are as follows:

(20) {circle around (1)} starting the GPU, allocating space in a display memory and copying the data to the display memory;

(21) {circle around (2)} defining the number of the blocks and the threads, spawning the threads, calling a kernel function, adopting a B-spline curve fitting to realize sub-pixels pinpointing of contour points;

(22) {circle around (3)} defining the number of the blocks and the threads, spawning the threads, calling the kernel function, calculating the mass center, the points on the inner contour and the fitting function, to obtain the corresponding points on the outer contour;

(23) {circle around (4)} the display memory and GPU transfer the calculated results to the CPU and the resources on the display memory and GPU are released.

(24) Mean and extrema calculation of insulating layer thickness based on the statistical method

(25) (1) Rationale

(26) Every cable section has an objective true value, and the most ideal measurement is to get this true value. However, the cable section is measured by humans using a CCD camera under certain illumination, which is limited by the sensitivity and the resolution capacity of the camera as well as the environmental instability, etc., hence the true value to be measured is immeasurable. Therefore, due to the natural limitation of accuracy and precision of the CCD camera, there are still residual inactive pixels even if the image is de-noised. The accuracy of the measured value will be influenced if the inactive pixel coincides with the inner wall point corresponding to the thickness extrema.

(27) Thus an appropriate value should be selected from all candidate thickness values as the last measured value to solve the maximum value and the minimum value of the thickness, instead of using a simple sorting algorithm. If the inner wall point corresponding to the thickness extrema is an active pixel, then there will exist heaps of similar active pixels around this pixel, making the neighboring thickness value only an approximation of the thickness extrema.

(28) (2) Basic Steps

(29) Calculate the maximum thickness, the minimum thickness and the average thickness of the insulating layer of the radial symmetrical cable section, i.e. select the appropriate value from all candidate thickness values as the last measured value. The schematic diagram of the radial symmetrical cable is as shown in FIG. 3. The specific steps of solving the minimum value of the insulating layer thickness include the following:

(30) {circle around (1)} sequencing the calculated thickness values of the insulating layer corresponding to each pixel of inner contour in an ascending order.

(31) {circle around (2)} taking N minimum values and corresponding 2D co-ordinates, marking them as set Tn;

(32) {circle around (3)} for the ith minimal value, defining the weight Wi=0; if the point q adjacent to it (point distance smaller than 3) in the image is in Tn, and the sequencing interval of the thickness does not exceed 10, then Wi++, and letting the adjacent points inactive in TN;

(33) {circle around (4)} making the same operation for N minimum values in the ascending order. If Wi is greater than a certain threshold, the current Ti is the minimum value.

(34) The present invention enables real-time calculation of the minimum size, the maximum size and the average size of the insulating layer thickness after obtaining the image of the cable cross section scanned by an HD industrial camera in a full-coverage way. The present patent will fill in the blanks of the high-accuracy parallel image measurement of the insulating layer thickness of the radial symmetrical cable section in the domestic cable industry, break down the monopoly and technology blockade by the concerned foreign manufacturers and improve the technology level of on-line measurement of product quality in China. Furthermore, it can expedite the production automation progress of domestic manufacturers, economize a great deal on labor, financial resources and material resources. The potential application is wide and expandability is satisfactory. In addition, the technology can be further developed to be applied to high-accuracy image measurement of enamel wire structures.