Skip to content

Commit b6ce681

Browse files
committed
tidied up and added usage messages
1 parent 50ccb55 commit b6ce681

File tree

3 files changed

+346
-230
lines changed

3 files changed

+346
-230
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# USAF Analysis Scripts
2+
3+
Something I do quite a lot of, as part of the [Openflexure Microscope](https://www.github.com/rwb27/openflexure_microscope) project, is characterise microscopes. Generally I want to measure:
4+
* The size of pixels, in sample units (i.e. nm per pixel)
5+
* The field of view (in units of distance)
6+
* The resolution of the microscope (using the point spread function)
7+
* Any distortion that might be present
8+
* Field curvature
9+
The US Air Force resolution test target consists of a series of "elements" of three horizontal or vertical bars. Usually the target is used by determining the smallest resolvable element, noting its number (given as a "group" and within that an "element" number), and finding the pitch of the three lines. However, this doesn't work so well for microscopes, as the smallest element on most easily available targets is usually group 7, element 6, which has a pitch of 4.4um, i.e. the bars and spaces in between are 2.2um. This is resolvable in even a fairly modest microscope.
10+
11+
Instead, this script uses the USAF target as a convenient object of known size - it will automatically locate the elements in an image, and accurately determine their size in pixels. From this, so long as the smallest element is known (the code assumes it's the group 7 element 6, though that can be changed), we can figure out the pixel size and field of view.
12+
13+
To determine resolution, we take images of an edge - it's convenient to use one of the large squares provided on the USAF target for this. After acquiring images ad different values of defocus and different positions of the edge, we can differentiate the images to get the response to a point source (assuming the edge was sharp) and recover the point spread function.
14+
15+
Distortion can also be measured using an edge; assuming the distortion is primarily radial, a straight edge will appear to bend as it is translated across the field of view. The distortion analysis script takes folders of images where an edge is scanned across the field of view, and recovers the distortion of the line as it is moved.
16+
17+
The scripts can generally be used to analyse either a single measurement (by passing a folder of images, or a single image) or multiple measurements (by providing multiple folders/files, or one folder that contains many such folders/files). All the scripts should display usage information when run with no arguments.
18+
19+
All these scripts are (c) Richard Bowman 2017 and shared under the GPL v3.0
20+

0 commit comments

Comments
 (0)