06-19-2023 11:46 AM - edited 06-19-2023 11:47 AM
Observed strange behavior (intensities deviations) with NI IMAQ Flat Field Correction VI.
As stated here the corrected image computed as:
Let proof this with simple VI:
First test just with constants: The Image with 2000 grays, Flat Field - 1000 grays and Dark Field 100 grays only. So far so good:
Now now I have "underresponding pixel", which deliver the only half intensity in Flat Field in my test image:
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):
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.
06-25-2023 11:49 PM - edited 06-25-2023 11:54 PM
Last weekend just wrote own implementation (LabVIEW 2023Q1 + CVI 2020), which at least matched "reference" computation and roughly 3+ times faster than original NI (because SIMD optimized using intrinsics).
Errors handling is minimal, feel free to modify, or use "as is" at own risk.
Andrey.