Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Non linearity between pixels and widht for linescan

Solved!
Go to solution

Hi

 

I'm developing a width gauge based on a linescan camera.

The gauge is measuring the surface of a steel strip moving at 200m/sec.

I found a non linearity between the relation of pixels and real widht:

1904mm X 6635,6pixels

1308mm X 4616,7pixels

814mm X 2880,6pixels

I've tried the working distances between 2600 to 2800mm.

The field of view is 2200mm.

The focal lengh is 35mm.

The size of CCD is 28.67mm (3.5um X 8192pixels - Basler raL8192-12gm).

Somebody already faced this problem?

 

Thanks,

Alexandre.

0 Kudos
Message 1 of 5
(4,887 Views)

I haven't had this exact problem, but it sounds like a lens distortion.  If you are able to image a (very accurate) ruler or similar object with known spacings, you should be able to define a mapping between width and pixels over your range of interest.  Whether or not that mapping is linear, you can easily "look up" the true width based on the pixel count.

0 Kudos
Message 2 of 5
(4,871 Views)

Hi Greg

 

Thanks for your answer.

That's a good idea. I'm going to do the ruler to evaluate.

Do you have a suggestion to adjust this distortion from the knowledge of the ruler?

0 Kudos
Message 3 of 5
(4,859 Views)
Solution
Accepted by topic author alexandresantos

There are a lot of ways to do it, such as fitting an equation to your data that you can then use, but if you want to be fast (and if you're using a very fast line-scan camera, then I'm guessing you do), I think the quickest way is to use a lookup table like this:

 

Interpolate.png

 

This simply assumes that the relationship is piecewise linear, that is, linear between each of your measured data points (and you've already provided three).  Keep filling in the cluster array with paired values (pixels, width), making sure that the values are in a strictly ascending order, and the Interpolate 1D Array function used here does all the work, and seems to be very fast too.  You only need enough points in the array to make your interpolation accurate enough for your needs.

 

There are certainly many ways to do this though, so someone else might have a better suggestion.

0 Kudos
Message 4 of 5
(4,848 Views)

Hi Greg

 

Thanks for your idea. I implemented a polynomial from Excel according the attached. It's running well until now.

Another problem that I'm facing is the oscilation on the image (https://www.dropbox.com/s/cboyglx74g8sd93/width%20gauge.mp4?dl=0) when the grid and filter are applied. I would like get stable the filtered image and grid from edge detector.

Does anyone know how to solve this?

 

Thanks for the moment.

0 Kudos
Message 5 of 5
(4,738 Views)