Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Calibrating distance

Hi

I need to be able to measure defects on my images.

Images are 12bit grayscale and I use VB.Net2005

The distance from the object to the camera can change.

I would put up a calibration plate on the object (100mm x 40mm) and then need to find out how many pixels from the two long opposing corners (100mm). I can then use this number to measure the length of defects.

There will be a contrast difference between the calibration plate and the surrounding area, because I am using X-Rays (plate will be black and surrounding area gray).

Using a built-in function to measure defect will not work because of amount of possible defects and inconsisitent contrast

I have looked throught the manuals I have need some help.

Thanks


0 Kudos
Message 1 of 5
(3,917 Views)
Hi bestbier,

Can you give us some more specifics of the method of defect detection you are using? Do you have a "golden template" part that is free of defects to compare against? And what do you mean by inconsistent contrast?

You could reduce the area of the image you are considering for calibration by choosing a region of interest (ROI) to calibrate over. You could restrict this region to just the plate in order to specify that only the plate's area is valid for your distance calibration.

With a little more information about the specifics of your setup (maybe even with some sample images), hopefully we can help you out further.
0 Kudos
Message 2 of 5
(3,897 Views)
Hi

My software is for X-ray imaging.

I cannot use automatic defect detection. There is a large variety of defects and every image has to be interpreted by the operator. This is the spesification and I cannot change this.

The contrast can change slightly, because the operator can adjust the x-ray machine which will result in a change in the overall brightness and contrast.

I need to allow the operator to measure distances on the screen and overlay a ruler. I am receiving the distance the object has moved from my plc. The distance from the object to the Image intensifier (the thing that changes the x-rays into light and has the camera inside) is not fixed. Every time a new object is loaded the distance can change.

I am going to get the operator to stick a 100mmx40mm plate on the first image of every object. This will show up on the screen. I need to measure how many pixels the the long side(100mm) of the plate is. If I can find the 4 corners that can also work. From there I calculate the real world distance of something on the screen

I need some help with finding the plate on the image using some of the built-in functions.

Best regards
Bestbier
0 Kudos
Message 3 of 5
(3,891 Views)
Hi bestbier,
If all you need to do is measure the ruler object in pixels, the Clamp function can do it for you. It looks for hard edges within a region of interest and measures the distance between them (horizontally or vertically) in pixels. You could perform a caliper on both the width and height of the reference ruler to verify that the proportions are being found properly.

Here's an example of what the output might look like

The actual function in question is called CWMachineVision.MeasureMaximumDistance in VB

Examples for clamping can be found in your NI Vision directory...

For VB: <NI Vision Directory>\Examples\MSVB\2. Functions\Caliper
For VB.NET: <NI Vision Directory>\Examples\MSVB.NET\2. Functions\Caliper
0 Kudos
Message 4 of 5
(3,869 Views)
Hi

Thanks for that

I actually found the caliper example just before I read your post.

I think I am going to use a round disc instead of the rectangulat one, that sould work nicely.

Thanks for the help

Bestbier
0 Kudos
Message 5 of 5
(3,859 Views)