view article

Figure 4
Image-processing pipeline for photometric crystal identification on a flat film. (1) From the original image, with a 500 µm scale bar and key to indicate a 100 µm beamsize relative to the sample; (2) this was processed in a multistep procedure comprised of adjusting the contrast of the image; (3) thresholding the image to generate a binary image setting all the pixel values above a certain value at 1 and all other values as 0; (4) using OpenCV's `findContours' algorithm to locate the centre of crystals; (5) superimposing the positions of the crystals located in the previous step onto the raw image; and (6) finding the shortest pathway across the sample which visits each crystal location once. For expanded (6), see Fig. S7 in the supporting information.

ISSN: 2052-2525