Project: Measuring the length of pipes 

Project: Measuring the length of pipes

This project is to measuring steel pipes on the product line. The key point is to get accurate length of the pipe, then with the weighting system and the diameter of the pipe is known, we can caculate the thickness of these pipes.
We use Computer Vision to solve the problem. But, before explaining our solution, we shall get some background of the project.
The oldest solution belongs to a German company. They use laser device to get the reflection from the end of the pipe and after measuring the time of the reflection, they can caculate the distance from the light source to the end point of a steel pipe. The plan works well for thick pipes, but virtually useless for the smaller one, because, when the pipes get smaller, and thinner, one can hardly point a laster emitter to the end of the pipe accurately, so the reflection becomes impossible.
Then another company came, they use line scan cameras fixed on each side of the pipe, after measuring each end of the pipe, they simply add the distance between the two cameras and get the whole length. This plan proves to be effective for pipes with any diameter, yet, in the meantime, has big problems even worse than the German idea.
For one thing, in the factory, vibrations caused by all kinds of machinary is inevitable, these subtle vibrations make the line scan cameras vibrate too and the output of the cameras change drastically just like in a earthquake, so you can image how bad the result might be. And for another, when the scan line get some noise on it, it's very hard to get rid of them, because all you depend is a single line of data. You got no more data to recover from the noise.
So, here comes our rescue, we use ordinary CCD cameras.
pic5.jpg

As the picture shows, we use 11 cameras. The first one pointing to the head of a pipe and the other 10 cameras are divided into 5 groups, so we can choose one group of them to measuring pipes with particular length.
Like the second solution, we measuring the end and rear of the pipe, then add the distance between them to get the total length.
But how to cope with vibration? The point is that we fix 11 standard boxes on the manufacturing line. When the pipe vibrates, the boxes vibrates as well. And the dimensions of the standard boxes are known, we can caculate the ratio of the pixel number to the real-world length. So, taking the standard boxes as references, we make the things simpler, we even don't need to calibrate the cameras by hand and even if the cameras are blurred, we can still get a accurate length. The picture below demonstrate how we archieve this:

pic6.jpg

On this picture, the standard box and the pipe all get blurred due to the defocus of the camera. Then on the scanline, the trasition of gray scale of the pixels will not be so sharp, instead, it's a slope which I draw with a green curve, so we cannot get the edge point using Gaussian operator, otherwise, we could introduce bigger error.
First we average all these green curves of the standard box to get another curve, the black one. This curve describes how the gray scale change on the edge of the standard box, Then we can use this curve as a template to find the horizontal displacement of the pipe's edge to the box's edge.
Then, we do the same thing to the pipe and get its edge curve.
Now, we can shift the first curve from left to the right and find a best matching point, on which the two black curves fits perfect, that point, is where the 'true' edge of the pipe lies.

Other hard stuff include capturing 11 frames in a round-around way from 2 capture board and get weight data from a RS232 cable.

The project goes well and is in the tuning phrase.

mortalscreen.jpg
This is the screen shot of our system(in Chinese), you can see the standard boxes and a pipe at the top. We got the accuracy around 5 mm, which is much better than expected. Vibrations are not problem at all, even you kick the camera (joke), or tap it by your hand, the system still works well.


mortalscreen1.jpg
This is the preview system for tuning the 11 cameras, some of these cameras are not switched on yet.

Return to Main Page

Comments

Add Comment




On This Site

  • About this site
  • Main Page
  • Most Recent Comments
  • Complete Article List
  • Sponsors

Search This Site


Syndicate this blog site

Powered by BlogEasy


Free Blog Hosting