# Advanced Biological Imaging for Intracellular Micromanipulation: Methods and Applications
## 3 Intracellular Micromanipulation with Computational Image Information
### Depth Acquisition
#### 3.2.1 Template Matching  
Template matching is based on the sampled image in the focal plane, where the contour of adopted manipulation tools or the targeted biological specimen is set as a template at the beginning of manipulation. By comparing the template with the features in the sampled image during the operation task, the current imaging depth can be estimated. A template matching method has been proposed to adjust the height of a micropipette tip in microinjections [147]. In this method, a micropipette was moved along the normal direction of a focal plane, and real-time images were recorded during the micropipette movement. The micropipette was assumed to be positioned in the focal plane when the pixel error between a template and recorded images was minimized. However, the micropipette may go to a wrong focal plane when it is close to the focal plane, as shown in plane A in Figure 8a. An optimized template matching method has also been developed [148]. In this method, a template image was binarized to remove useless information. The gradient of differences between the template and the recorded images was compared to determine if the micropipette was above the focal plane. A template similarity score was established to calculate template differences [149, 150]. When the score is maximized, manipulation tools was aligned to the height of the focal plane. In attached cell microinjections, a micropipette is lowered down to penetrate the cell without sliding on the dish  
Figure 7: Tracking methods of manipulation tools and targeted specimens. **(a)** Micropipette tracking based on a motion history image where the red region illustrates the motion history of the end-effectors and arrows show its motion gradient. Adapted with permission from Reference [136]; **(b)** Micropipette tracking based on the reinitialization and recovery mechanism. The micropipette tip is tracked using a predefined template before cell occlusion. After that, the Relock mechanism is activated to track the micropipette tip with the updated template during cell interaction. Adapted with permission from Reference [137]; **(c)** Sperms tracked with the modified joint probabilistic data association filter method. Adapted with permission from Reference [139]; **(d)** Cell aspiration length tracking process, where the original sampled images were smoothed and separated into two ROI. The aspiration length was tracked with left ROI. Adapted with permission from Reference [143]; **(e)** Aspiration length tracking with CFM-sampled images. Adapted with permission from Reference [144]; **(f)** PAM imaging of a microbot in mouse vena cava. Adapted with permission from Reference [146]. **(g)** Activation and tracking of the calcium-mediated actuator inside mouse T-cells. White arrows indicate the targeted cell before and after photon activation. Adapted with permission from Reference [146].  
substrate for the sake of breakage. In a three-frame template matching method [151], a current source image was compared with Frames 1 and 3 to check if the micropipette touched and scratched the substrate, as illustrated in Figure 8b. In addition, the centroid coordinates of the cells in the central template are also compared with the surrounding frame to identify the paired target [152]. However, template matching has some drawbacks. First of all, the template image should be manually selected before starting the operation, which requires a lot of labor and operation time. Second, when changing the target, the selected template is not universal, and a new template should be selected again. Third, the method is susceptible to external disturbances, noises, and imaging errors. When the imaging field moves during micromanipulation, the current focal plane probably differs largely from the original one, and the matched depth is far from the targeted plane. Therefore, template matching is suitable for processing biological objects whose size is much larger than the size of manipulation tool, because the estimation errors will not cause operation to failures.