4. Image distortion correction

Imaging devices such as office scanners and cell phone cameras have micron-scale distortion in the image (i.e. 300 μm shift per 5 inch). Such image distortion result reduced accuracy in targeting small samples (~300 μm). Therefore, using such images for targeting small samples will make optically guided targeting impossible. To solve this problem, macroMS measures optical distortion in imaging devices by using reference dot grid array called distortion target which contains dot arrays in a perfect spatial accuracy (Example shown below). By comparing measured positions of the array dots and expected positions, distortion is measured to correct for the position of the samples. macroMS can work with moderate distortions only. The procedures below calibrate a region of the imaging device and

Materials required for distortion correction of scanner imaging:

A reference grid array slide (i.e. catalog # FA127 51X51 array, II-VI Aerospace & Defense), an office scanner, Bruker MTP sized TLC-MALDI Adapter Target (Order No #255595), 50X75 mm ITO glass slide, and a 25X75 mm microscope slide. Note: For the clear glass type, attach a white paper onto the back side of the glass to attain white background in imaging. To prevent scratches on the target glass, attach tape to the front side of the target glass to create a gap between the scanner glass and target glass. Make sure neither the paper nor tape reaches out of the edge of the glass. These steps are unnecessary for the Mylar type. Also note that this workflow can work with other sizes of distortion target/ITO glass as long as the same scanner area is used for imaging both target grid and the sample area.

Imaging procedure for scanner:

The main idea is calibrating a region of scanner, and this region is used to image the actual sample. Also the target glass should not be tilted with respect to the vertical and horizontal axis of the scanner glass.

Position the distortion target and the microscope slide at the top left corner of the scanner glass like below. Press the target glass diagonally towards the corner edge to orient the glass, aligning the glass to the both edges of the plastic frame of the scanner glass. NOTE: when removing fingers, be careful not to pull the slides inadvertently.

From the preview mode, set the area for scanning.

Adjust parameters to maximize the contrast between the dots and the background. Then perform scanning.

It is imperative that the dot array on the distortion target glass and the samples on the sample glass occupy the sample physical area of the scanner. Therefore the precise area for scanning will be reused for imaging the sample ITO glass. To achieve this, set the TLC plate adapter with the ITO glass on scanner like below.

Again, press the adapter diagonally towards the top left corner edge of the scanner glass to orient the plate, using both edges of the plastic frame of the scanner glass. NOTE: when removing fingers, be careful not to pull the slides inadvertently.

Turn off the room light and perform scanning using the same area used for 2400 dpi scanning of the reference glass. Normally it means clicking the scan button again.

Check if the samples in the second image fall into the dot array area in the first image. For this, open the first image using a photo viewer software, and switch back and forth between the two images by pressing the left/right key, and visually check the position of the samples.

macroMS workflow for distortion measurement & correction

Upload the images for the distortion target and ITO sample slide to the macroMS using the input fields indicated below

When the page for the distortion target opens, perform image thresholding/inversing.

Perform feature recognition to find 2601 features exactly. Manually remove false positive identifications if more than 2601. Manually adding a blob is not recommended, therefore try adjusting the threshold value to enable blob finding all 2601 automatically.

Activate 'mark corner points' mode by clicking the radio button that is labeled 'mark corner points'. Then click the green boxes on the four corner points of the 51X51 array. This will result in four red boxes on the corner spots.

Input the number of rows / columns in array which will be 51 for both, and indicate imaging method (scanner / camera). Then plot the distortion by clicking the Generate the reference button. Inspect the resulting distortion graph. Below is an example.

Note that the max error in both graphs cannot be larger than 80% of the average distance between the spots. This is because distortion correction function only works with moderate distortion. macroMS will alert the user if the max value goes above the threshold. Most modern devices will pass the cutoff. For our example using EPSON V300 scanner, the distortion reached ~10% of the average distance between the spots

If the area of the scanner will be reused for multiple sample slides, 'Download measurement' button can be clicked to download the measured optical distortion in a text file. This text file can be submitted instead of the image file for the reference grid, and uploading the text file results in bypassing the distortion measurement procedure and proceed directly to the page for sample image.

Proceed to the page for sample image by clicking 'Finalize & proceed' button.

In the next page, 'Show distortion correction area' button can be clicked to show the yellow rectangular area where distortion correction will be performed (shown below).

Outside the area, any features such as sample points or fiducial points are deleted/ignored automatically during the output file generation. The sample points outside the box do not need to be removed manually. Note the image itself will not be corrected, just the position of the found features will be corrected during the output xeo file generation step. Then target finding + geometry file generation can continue.

Distortion correction of cellphone / camera imaging:

The steps and principles are the same as scanner, except macroMS accepts arrays that are imaged at a tilted angle/imperfect perspective. Take a photo of the distortion target like below, where the reference array covers the maximal possible area within the image. All fiducial points and samples should be in this area in the next image.

Last updated