Algorithm - kpmoorse/sim_reg GitHub Wiki
- Repeat until convergence:
- Estimate correspondence via nearest neighbor search
- Estimate transform between point clouds via linear regression
- Apply transform to model
- Return estimated transform
![]() |
|
|---|
Model (M) and Scene (S) are represented as Nx3 matrices, where each row represents a point in R2, with unity appended to allow for offsets (translations) in the estimated transform (T). Normally, finding T via linear regression could be done more easily using a built-in function, but the matrix formulation shown above will be important for the extensions which will be proposed below.
For neural data, robust methods exist to extract individual neuron footprints via either image segmentation or functional correlation. However, basic registration methods like naive ICP often fail to converge to the desired solution due to the roughly periodic (hex-packed) structure of the data, which regularly causes "off-by-one" errors.
![]() |
![]() |
![]() |
|---|
By inserting a diagonal weight matrix into the Naive ICP formulation, we gain an extra degree of freedom which can be used to guide the algorithm away from the local minima associated with "off-by-one" errors.
When the original images are reduced to point clouds for registration, all of the image information is wasted. Rather than throwing that data away, we can instead use it to generate similarity values which can be used to populate the weight matrix. First, we extract a uniform ROI of image data around each neuron centroid and decompose it into its Zernike moments, which have the desirable properties of being orthogonal and rotation-invariant.
Then, for each pair of estimated corresponding points, we generate a "similarity" value between the two vectors of Zernike moments. There are many principled ways of generating this value, including mutual information, but we use a simple correlation metric from signal processing here because it is intuitive and effective.
![]() |
Correlation
Mutual Information
|
|---|
Naive ICP implicitly assumes that the Model point cloud corresponds to a subset of the Scene (M⊆S), which is often untrue for real data. To force the validity of the assumption, we provide the algorithm with ξ ∈ (0,1), the a priori "minimum overlap" between M and S, and only the floor(ξNModel) correspondences with least Euclidean distance are used for each iteration.
It is common that more than one point in the Model is assigned correspondence to the same point in the Scene. In this case, we want to apply post-processing to remove erroneous points from the final correspondence vector. Unfortunately, it is not generally the case that correct and erroneous points are separable by Zernike similarity value--that is, there is no similarity threshold at which we are confident that higher values are correct and lower values are incorrect.
However, it is generally the case that when duplicate correspondences are compared, the one with the highest similarity value is the true correspondence. So, we cull all correspondences for which there exists a better correspondence to the same Scene point.
- Repeat until convergence:
- Estimate correspondence via nearest neighbor search
- Calculate weights via correlation of Zernike moment vectors
- Generate trimmed point clouds
- Estimate transform between point clouds via weighted, trimmed linear regression
- Apply transform to model
- Remove points with duplicate correspondences
- Return estimated correspondences




