Observed strange behavior (intensities deviations) with NI IMAQ Flat Field Correction VI.
As stated here the corrected image computed as:
![eq_flat_field_correction eq_flat_field_correction]()
Let proof this with simple VI:
![snippet.png snippet.png]()
First test just with constants: The Image with 2000 grays, Flat Field - 1000 grays and Dark Field 100 grays only. So far so good:
![Screenshot 2023-06-19 18.39.51.png Screenshot 2023-06-19 18.39.51.png]()
Now now I have "underresponding pixel", which deliver the only half intensity in Flat Field in my test image:
![Screenshot 2023-06-19 18.41.07.png Screenshot 2023-06-19 18.41.07.png]()
As you can see, the median was not changed, the factor for this pixel increased to 2,25 and I have more or less flat result around 2000 grays, but NI's result is only the half. Look like kind of "normalization" running behind the scenes.
Now a little bit magic. I will increment intensity of the single pixel in Gain image from 1000 to 1001, keep other unchanged and then the results are the same (more or less):
![Screenshot 2023-06-19 18.42.17.png Screenshot 2023-06-19 18.42.17.png]()
In general the same with Dark Field Image, I can get the values well below the expected, or significantly above.
May be issue with normalization, may be rounding, may be with Median, but anyway the practical results is different from mathematical theory.
Looks like an issue for me.