From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-20-2013 07:33 AM
Due to the constraints of the where my camera and lights must be mounted I have slightly uneven lighting. Moving from left to right across the image the gray levels drop by 10 - 20. As this is predictable and repeatable I'd like to apply some kind of filter to bring the whole image back to a more uniform level. Any suggestions?
12-21-2013 10:13 AM
try placing a very white backdrop in the field of view of the camera. Snap a picture. Find the lowest, or highest value in the image. Subtract the high value from every pixel in the image. The resulting image is now a Non-Uniformity correction map. Store this image, and add it to every image you capture. The intensity values will be corrected then.
Any time you move the lights, or make any other adjustments to the camera, you will need to take another NUC image. If the camera runs hot, you may want to wait until it reaches normal operating temperature.
You can do the image math either by converting to arrays, or with the IMAQ math functions. If you have Vision Assistant, you can do the same thing there.
12-24-2013 05:51 AM
Hi,
What movijohn explained to you is termed as "flat field correction". This is a very simple yet accurate and fast approach to take care of change in intensity over the same image
but are constant from one image to another. more details can be seen at http://en.wikipedia.org/wiki/Flat-field_correction
regards
aveo
01-02-2014 07:58 AM
Thank you for the advice, this seems exactly what I was looking for. I'll give it a go and let you know how it works out.
01-02-2014 11:30 AM
I would consider using a multiplicative correction factor instead of an additive factor. You can pick the largest value in your reference image and divide the number by each pixel value. To correct another image, multiply each pixel by the matching factor. This works better in images with large variations in brightness. If you images are fairly uniform brightness, the additive method works fine.
Bruce
07-28-2014 06:46 PM
I am actually trying to balance the lighting on my images. My camera vendor recommended running a flat field calibration. Says it is the process of taking a black image (lens cap on) and am image of a white target. I am hot spotting in the center and rolling off on the edges. Finding it is not "built-in" to the NI Vision software. Is this correct?
Not excited about writing this utility (will post result) but need to make sure I understand your algorithm. This is my understanding of how this can be accomplished.
- Take image of white target
- Find minimum pixel value
- Create image of same size using minimum pixel value
- Do image subtract to create reference correction image
To Apply Correction
- Do image subtract of captured image and reference correction image
Does this sound correct?
Matt
07-30-2014 12:37 PM
I found an easy method since I posted last. Use IMAQ Mult Div with your reference image as the input and the image that needs to be corrected as the other input. The constant should be whatever value you would want the reference image to be. If you test it by using the reference image as both inputs, the output will have all the pixels equal to the constant value.
I used this on one of my projects and it worked amazingly well.
Bruce
07-30-2014 04:32 PM
Yes, I think there's a large cross-over with this thread.