How to detect when an image is out of focus? -
at times our optical inspection system gets out of focus results in nonsensical measurements. i've been tasked develop 'out of focus' detector used drive z axis of camera system. images available me bmp.
i'm looking approaches , algorithms investigate. instance, should isolating features , measuring conformance or edge detection used?
this in focus image:
, out of focus image:
the key in-focus image has more strong gradients , sharp features. suggest apply gaussian laplace filter , @ distribution of pixel values of result. plot below shows application of idea images, black refers out of focus image, , red 1 in focus. in-focus 1 has more high values (because image has more sharp gradients).
when have histograms, can distinguish 1 comparing e.g. 90%th percentiles of distributions (which sensitive tails). out of focus image 7 , in-focus image 13.6 (so twice difference).
Comments
Post a Comment