Bcpd
Bayesian Coherent Point Drift / Domain Elastic Transform
Install / Use
/learn @ohirose/BcpdREADME
Bayesian Coherent Point Drift / Domain Elastic Transform
NEWS
- Mar 22 2026 We uploaded our paper proposing Domain Elastic Transform to arXiv.
- Mar 18 2025 We initiated distributing Domain Elastic Transform Code initial commit
This repository provides a software suite implementing Domain Elastic Transform (DET), Bayesian Coherent Point Drift (BCPD/GBCPD), and Dependent Landmark Drift (DLD), BCPD registers two point clouds, which can be applied to shape analysis, 3D model reconstruction, and so forth. DET registers two functions, which can be applied to aligning spatial transcriptomics data, digital images, and audio signals. DLD is a method for active shape model fitting. All methods can be accelerated using downsampling and displacement field interpolation, indicated by '++' after the method’s name, as in BCPD++.
For more information, see Hirose2026 (DET), Hirose2022 (GBCPD/GBCPD++), Hirose2020a (BCPD), and Hirose2020b (BCPD++). Also, several examples can be watched in [Video 1], [Video 2], [Video 3], [Video 4]. If you have any questions, kindly email ohirose.univ+bcpd(at)gmail.com with your name and affiliation.

Table of Contents
References
The details of the algorithms are available in the following papers:
- [DET] O. Hirose and E. Rodolà, "Domain Elastic Transform: Bayesian Function Registration for High-Dimensional Scientific Data," Mar 2026.
- [GBCPD/GBCPD++] O. Hirose, "Geodesic-Based Bayesian Coherent Point Drift," IEEE TPAMI, Oct 2022.
- [BCPD++] O. Hirose, "Acceleration of non-rigid point set registration with downsampling and Gaussian process regression," IEEE TPAMI, Dec 2020.
- [BCPD] O. Hirose,
"A Bayesian formulation of coherent point drift,"
IEEE TPAMI, Feb 2020.
- The article's supplementary document contains proofs of propositions.
- Fig. 15 in the print version was accidentally replaced by Fig. 3 during the publication process after the review process. See an erratum correcting the error.
- In Fig. 2, following Proposition 3, please replace
with
as follows:
Performance
GBCPD vs CPD
GBCPD works better than CPD and BCPD if it registers the shapes whose different parts neighboring each other:

BCPD vs CPD
BCPD is faster than coherent point drift (CPD) and is often more accurate. The following figure shows a comparison using Armadillo data included in demo data (vs Dr. Myronenko's implementation on Macbook Pro Early 2013):
<img src="https://github.com/ohirose/bcpd/blob/master/img/vs-cpd.png" alt="vs-cpd" width="400"/>BCPD vs BCPD++
BCPD++ is much faster than BCPD but is slightly less accurate (Mac Mini 2018).
<img src="https://github.com/ohirose/bcpd/blob/master/img/vs-plusplus.png" alt="vs-plusplus" width="400"/>Demo
The software provides the following demonstrations:
- Function registration: image/shape/audio registration (DET)
- Point set registration (BCPD/BCPD++)
- 3D model reconstruction from point clouds (BCPD/BCPD++)
- Shape transfer (BCPD/BCPD++)
- Surface registration (GBCPD/GBCPD++)
- Active shape model fitting (DLD)
Dataset Preparation
Download the following datasets and move them into the data folder in this software:
Demo Script Execution:
All demo scripts except for the shape transfer can be executed as follows:
- Start MATLAB and move into a foloder including demo scripts, e.g.,
demo/bcpd-3drecov. - Double-click a demo script, e.g.,
demoRecovChef.m. - Press the run button in the code editor of MATLAB.
The demo scripts of the shape transfer can be executed as follows:
- Go to the
demo/shapeTransferfolder using your terminal window. - Run a bash script, e.g., type
./shapeTransferA.shin the terminal. - Check output files named
transferV[1/2]_y.interpolated.obj.
Compilation
Please contact the author if the compilation fails.
Windows
Ready to go. The compilation is not required. Use the binary file bcpd.exe in the win directory.
macOS
- Install Xcode, Xcode command line tools, Homebrew.
- Install OpenMP and OpenBLAS using Homebrew.
- Download and decompress the zip file containing bcpd source codes.
- Move into the top directory of the uncompressed folder using the terminal window.
- Type
make.
Linux
- Install OpenMP and OpenBLAS.
- Download and decompress the zip file containing bcpd source codes.
- Move into the top directory of the uncompressed folder using the terminal window.
- Type
make.
Usage
Brief instructions are printed by typing ./bcpd -v (or bcpd -v for windows) in the terminal window.
The binary file can also be executed using the system function in MATLAB.
See MATLAB scripts in the demo folder regarding the usage of the binary file.
Terms and symbols
- X: Target point set. The point set corresponding to the reference shape.
- Y: Source point set. The point set to be deformed. The mth point in Y is denoted by ym.
- N: The number of points in the target point set.
- M: The number of points in the source point set.
- D: Dimensionality of the space in which the source and target point sets are embedded.
- D': Dimensionality of the codomain used only for function registration.
- Fx: The matrix collecting the target function values.
- Fy: The matrix collecting the source function values.
Algorithms
[BCPD] Type the following command in the terminal window for Mac/Linux:
./bcpd -x <target:X> -y <source:Y> (+options)
[DET] Type the following command in the terminal window for Mac/Linux:
./bcpd -x <target:X> -X <target:Fx> -y <source:Y> -Y <source:Fy> (+options)
[DLD] Type the following command in the terminal window for Mac/Linux:
./bcpd -x <target:X> -y <mean:Y> -C <shape variations> (+options)
For Windows, replace ./bcpd with bcpd and run the command in the DOS prompt.
Input data
-x [file]: The target shape represented as a matrix of size N x D.-y [file]: The source shape represented as a matrix of size M x D.-X [file]: The target function values represented as Fx of size N x D' (DET only).-Y [file]: The source function values represented as Fy of size M x D' (DET only).-C [file]: The shape covariance's eigenvaluesLand eigenvectorsQ, formatted as[L';Q](DLD only).
If the file names of target and source point sets are X.txt and Y.txt, these arguments can be omitted.
Transformation models
-Tsrn: Default. Similarity + nonrigid transformation, defined as T(y)=sR(y+v)+t.-Tan: Affine + nonrigid transformation, defined as T(y)=A(y+v)+t.-Ta: Affine transformation, defined as T(y)=Ay+t.-Tsr: Similarity transformation, defined as T(y)=sRy+t.-Tr: Rigid transformation, defined as T(y)=Ry+t.-Tn: Nonrigid transformation, defined as T(y)=y+v.
Note s is a scale factor, R is a rotation matrix, A is a matrix of full rank, t is a translati
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
