Monday, July 10, 2017

image processing - Auto-focus estimation?


What kind of analysis might be used on sets of 2D monochrome image matrices or bitmaps to estimate or compare their relative quality of being "in focus"? Is there an efficient way of computing a scalar metric on something like overall contrast, luminance sparsity, or other artifacts produced from out-of-focus blurring?



Answer



Images in focus have sharper edges, so applying an edge detector and measuring the energy of the output puts you on the right track.


A simple technique is to compute the sum of the laplacian over the images, possibly center-weighted if you deal with everyday photographs (people tend to put the object of interest in the center, so it's better to have the center in focus than the borders)


This criterion is for example what is used in many "Stack focusing" applications for macro photography.


There are other approaches used in de-hazing or tone-mapping... Search for "Local contrast measures".



No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...