ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
12-09-2014 11:53 AM - edited 12-09-2014 12:06 PM
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.
Solved! Go to Solution.
12-09-2014 07:46 PM
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.
12-10-2014 04:38 AM
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?
12-10-2014 02:09 PM
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:
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.
12-23-2014 10:39 AM
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.