← BACK

Computer Integrated Surgery

Archived
Timeline

Oct 2025 - Dec 2025

Role & Context

Academic Project

Core Tech
MATLABLinear AlgebraBernstein Polynomials

Project Summary

Built a complete stereotactic navigation system from scratch to translate preoperative imaging (CT/MRI) into real-time surgical guidance, addressing tracking, calibration, and registration.

Key Features

  • Rigid Body Registration (Arun's Method) for coordinate alignment
  • Pivot Calibration using linear least-squares to solve for tool tip offset
  • 5th-order 3D Bernstein polynomial correction for EM field distortion
  • Generalized ICP and Covariance Trees for real-time surface registration

Impact & Takeaways

  • Mitigated >3mm EM distortion error to clinical standards (<0.5mm)
  • Reduced point-to-mesh query complexity from O(N) to O(log N)
  • Validated system against multiple noise models for robustness

Context & Motivation

In modern robotic surgery, sub-millimeter precision is a requirement for performing any surgical tasks. Within my "Computer Integrated Surgery" course, we focused on building the registration system for stereotactic navigation from scratch. This project addresses the critical "interventional loops" of tracking, calibration, registration, and error correction, calibrating preoperative imaging data to the surgical OR workspace.

System Architecture

Pre-Op Imaging CT / MRI
Registration
Surgical Plan 3D Coordinates
Tracking
Intervention Navigated Tool

Mathematical Implementation

The system relies on rigorous linear algebra and computational geometry principles to map between the Calibration Frame (FcF_c), Optical Tracker Frame (FAF_A), and EM Tracker Frame (FDF_D).

1. Rigid Body Registration (Arun's Method)

To align the coordinate systems, we implemented a 3D Point Set Registration algorithm.

Algorithm Steps:

  • Centroid Alignment: Compute centroids xˉ\bar{x}, Xˉ\bar{X} and center the points to remove translation.
  • SVD: Compute the cross-covariance matrix H=xi(Xi)TH = \sum x'_i (X'_i)^T and its Singular Value Decomposition [U,S,V]=svd(H)[U, S, V] = \text{svd}(H).
  • Rotation: solve R=VUTR = V U^T. We ensure det(R)=+1\det(R) = +1 to prevent reflection artifacts.
  • Translation: Recalculate t=XˉRxˉt = \bar{X} - R\bar{x}.
Registration Setup

Registration Reference Frames

2. Pivot Calibration

We solve for the unknown tool tip offset ttipt_{tip} and the fixed pivot point pdimplep_{dimple} by treating it as a linear least-squares problem:

[RiI][ttip;pdimple]=ti[R_i | -I] \cdot [t_{tip} ; p_{dimple}] = -t_i

By stacking matrices for NN frames, we solve Ax=bAx=b using the lsqr method to find the 6-unknowns (3 for tip, 3 for pivot).

Pivot Calibration Setup

3. Distortion Correction (Bernstein Polynomials)

Electromagnetic tracking is susceptible to field distortion. We implemented a 5th-order 3D Bernstein polynomial correction map. This required solving for 216 coefficients (636^3) to map distorted EM readings back to the ground-truth optical space.

Distortion Correction Mapping

Algorithmic Modules

Iterative Closest Point (ICP)

For surface registration, we implemented a Generalized ICP algorithm with anisotropic covariance weighting. This improved convergence speed by 50% (11.0s vs 37.2s) compared to standard point-to-point ICP.

ICP Convergence

Covariance Trees

To support real-time interaction with high-res anatomical meshes, we constructed spatial search trees (Covariance Trees). This reduced closest-point query complexity from linear O(N)O(N) to logarithmic O(logN)O(\log N).

Covariance Tree Structure

Performance & Results

Error Analysis & Robustness

We validated the system against three noise models to quantify registration error. The Bernstein Polynomial correction was critical in mitigating the >3mm error introduced by EM field distortion.

Noise ConditionMean Diff Norm (mm)Max Diff Norm (mm)Impact
Baseline (None)0.000.01Ideal
Optical Tracker Jiggle0.010.03Negligible
EM Noise0.460.79Minor
EM Distortion3.517.09Critical (Requires Correction)
With Correction< 0.50~ 1.10Clinical Standard Met
  • Registration Accuracy: The unit tests confirmed rotation and translation recovery errors <1×106< 1 \times 10^{-6}.
  • Search Efficiency: Covariance Trees reduced point-to-mesh query times from linear O(N)O(N) to logarithmic O(logN)O(\log N).
Error Analysis Visual
BACKEnd of File