Scanner Calibration

Calibrating the scanners to the camera view

This section describes how to calibrate the scanners so that they are in register with the image.

Before beginning

The first time you start Zapit you will see the full field of view of the camera. Since we only care about the area around the skull, we press "ROI" to draw a box and zoom in. This ROI is remembered when you next start the software. You can zoom back out again with the "Reset" button. Ensure the exposed of the skull is sharply in focus.

Pointing the beam

Press Point Mode and click on the image. Zapit will attempt to place the beam at the clicked position. Likely it will be off (see image below) because the scanners have yet to be calibrated: the "Scanners Calibrated" indicator will be red. After clicking the beam remains on. You can alter laser power used for interactive calibration operations with the slider (the laser power used during stimulation for experiments is set elsewhere). You can turn off the beam with the laser On/Off switch next to the slider but the system will remain in Point Mode. Clicking Point Mode again will turn off the beam and exit point mode. You can enter a different mode (e.g. Cat & Mouse) directly without first un-clicking Point Mode.

Conducting the calibration

Press Run Calibration to present a grid of points and conduct the calibration. Green circles are drawn at locations where the beam position was detected. You can use the Point Spacing spinner box to alter the density of points: 2 or 3 mm is usually OK. You can use the Border Buffer spinner box to avoid placing the laser near the edges of the field of view. e.g. setting this to 2 will mean that no laser points will be placed within 2 mm of the image border. A good calibration can be achieved with as few as four or five points. Adding more points will likely have a minimal impact, as the transformation being calculated is rigid (scale, rotation, and translation).

The exact spacing values will depend upon having a reasonably accurate value for scanners.voltsPerPixel in your settings file. See the "Scanner & Cameras settings" section under "Configuring Zapit".

Checking the calibration

Press the Check Calibration button and the beam will cycle over all detected beam positions (image below). You can also enter Point Mode or Cat & Mouse to confirm the laser goes to the clicked location (image below). You might want to turn down laser power to get a clearer image of the spot. At higher powers the spot size appears larger as the camera picks up more scattered light.

Troubleshooting

  • What if too few points are found? Try changing the laser intensity, the camera exposure, check the laser spot is in focus (use the Point button and turn down the power). If you still have an insufficient number of points, look at the messages that appear on the command window during calibration. When finding the laser, Zapit looks for a small bright spot with a total size (the number of pixels) no greater than the value in Size Thresh. Reports to the command line will indicate if a point was excluded due to this. You can try increasing Size Thresh.

  • What if problematic points on a headbar or similar are being detected? Try increasing the "Border Buffer" setting in the GUI, causing a greater region around the ROI edge to not be sampled. You can also try reducing altering the "Size Thresh" setting in the GUI. If something is out of focus it yields a larger laser spot size and a smaller threshold should cause this to be ignored.

Last updated