You can subtract one image from another using IMAQ. This is one of many tools available.
It is also possible to estimate the light level by using a large averaging filter, then subtract the resulting image from the original image.
Bruce
Bruce Ammons
Ammons Engineering