Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

shading correction

I wonder if there is a precast possibility to run a shading correction on images. I didn'f find something like this - ideas?
0 Kudos
Message 1 of 2
(3,196 Views)
If your lighting is uneven, it is possible to correct the image. It depends on how uneven it is.

The basic idea is to average the brightness over a large area. The area must be 2 or 3 times larger than any details you are examining. For example, if you are trying to read some text that is 20 pixels high, you would want to use a 60x60 averaging filter to figure out the average intensity in that area. Once you have figured out the average background intensity, calculate a scaling factor for each pixel to get to a fixed brightness. Essentially, divide your desired background brightness by the pixel intensity. The final step is to apply this scaling to your original image.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 2
(3,196 Views)