Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity calibration suggestions?

Hi,

 

I have developed machine vision tests with NI Vision Builder on the development environment which has a certain type of lightning surrounding (lights on the roof etc). Production factories lights differ from our development. On the other words, we do not have standardized the vision environment. Therefore I need to programmatically calibrate images taken by the camera. Is there any handy method or suggestions how to calibrate and tune for example changing camera exposure time to correspond the development environment?
I was thinking to measure intensity from one area (or many points) in development to be as a reference point. Then measure same area in production and tune camera exposure time to find same intensity values. Any other ideas?

 

Br,

Jick

0 Kudos
Message 1 of 5
(2,965 Views)

Hi Jick,

 

I'd like to confirm a few things about your question.

Are you looking to interact with your application in run-time to calibrate image acquisition?

Or are you looking to automate the calibration based on a reference image that is taken in development?

 

I assume it is the latter, but It's worth confirming to be on the same page.

 

Cheers,

Kevin

0 Kudos
Message 2 of 5
(2,907 Views)

Hi,

 

I am looking the methods to compensate image brightness in run-time.
For example, when I develop a vbai test which uses Match Pattern function with a reference image taken at the place which has certain type of lightning conditions. There the step works well. Then, when I move the setup for example darker room I will struggle with that step because the reference image taken in the brighter room will not match good enough with the darker conditions. Therefore, I would like to compensate this using for example different exposure times to get same brightness to image as it is in the development environment. This needs calibration at each room. My original idea was to measure intensity of any constant point of the image and tune exposure time to match the reference conditions (development room conditions).

Is there way to change Acquire Image step exposure time programmatically or should I calibrate and set it manually in each environment?

 

I hope I was clear enough 🙂

Br,

Jick

0 Kudos
Message 3 of 5
(2,898 Views)

Hi Jick,

 

Thank you for clarifying.

 

I was able to find the following Knowledge article that explains how to programmatically set camera attributes:

Programmatically Get and Set Attributes with IMAQdx vs. IMAQ for IEEE 1394

 

You can set the shutter speed through a property node by writing to the active attribute with a numeric. To check if you camera supports this, and to know which string to use to set shutter speed as the active attribute, use the IMAQdx Enumerate Attributes VI (explained in the additional information section of the article).

 

Cheers,

Kevin

 

Edit: Nevermind, I should have read the vbai part more carefully. I'm still looking for a way of doing this.
Here is another article that might help:

http://digital.ni.com/public.nsf/allkb/2B9B31A6E53A8D2586257673006482B5

 

 

Message 4 of 5
(2,889 Views)

You should also check out the Flat Field Correction step. If you press Ctrl-H when editing the step and view the Concepts tab, it discusses how to handle the case where the lighting changes at run time.

 

Hope this helps,

Brad 

Message 5 of 5
(2,876 Views)