This repository contains the pre-processing code for the Structure-from-Sherds project, which focuses on preparing pottery fragment data for reconstruction. The pre-processing pipeline includes:
- Mesh-to-Surface
- Breakline Extraction
- Axis Extraction
Total 10 different potteries with 142 fragments. Scanned from real-broken sherds (not in the real-scale)
Dataset structure:
Dataset/
├── Mesh/
│ ├── Pot_A/
│ ├── Pot_B/
│ ├── ...
│ └── Pot_J/
└── Point/
├── Pot_A/
├── Pot_B/
├── ...
└── Pot_J/
Each folder contains the data for the corresponding pottery fragment.
Pottery fragments (3D scans in .obj format) are turned into processed point clouds with relevant surface information and geometric features that aid in the reconstruction process.
-
PCL (Point Cloud Library): 1.9.1
- Required for point cloud processing and surface analysis
-
CGAL: 5.0
- Used for mesh processing and surface operations
-
C++ 17 or higher
-
MatLab (for Axis Extraction)
- Build the Docker image:
docker build -t sfs_pre:latest . - Download Dataset
sh ./download.sh - Run docker container
sh ./setup_container.sh- You might have to change --volume="/Dataset:/Dataset" \ at line 20 according to your dataset path
- Build with cmake file
## Command at container ## mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release make - Run the program
-
Mesh-to-Surface Processing
# Inside the build directory ./MeshprocessingThis will generate:
*_SampledWithNormals.ply: Point cloud with normals*_Surface_X.ply/xyz: Segmented surfaces
-
Surface-to-Breakline Processing
# After generating surface files ./EdgeLineExtractionThis will generate:
*_CompleteBreaklines.xyz: Final breakline output
-
Axis Extraction
# Using MATLAB # 1. Open preprocess_new_pots.m in MATLAB # 2. Edit the root_path variable to point to your data directory # 3. Run the script
Mesh2Surface processing converts raw 3D mesh files into processed point clouds for surface analysis and segmentation.
-
Mesh to Point Cloud Conversion
- Samples original
.objfiles using CloudCompare (up to 1,000,000 points) - Applies initial noise filtering
- Output: PCD format point cloud
- Samples original
-
Surface Processing
- Normal Estimation & Orientation: PCA-based normal estimation with k-nearest neighbors
- Uniform Sampling: Reduces point density while preserving surface features
- Surface Segmentation: Region growing based on normal similarity, curvature, and proximity
-
Surface Analysis & Refinement
- B-Spline Surface Fitting: Improves boundary definition and reduces noise
- Cluster Analysis: Merges related segments and handles special cases
After finishing Mesh2Surface steps (generating *_Surface_X.xyz), we run the breakline code to extract and refine boundaries on each fragment. This process produces a final boundary file, *_CompleteBreaklines.xyz or .pcd, which can be used for matching or assembly in downstream tasks.
-
Breakline Detection
- Initial boundary detection based on surface normals (e.g.,
BoundaryEstimationin PCL) - Automatic ordering of boundary points into continuous segments
- Initial boundary detection based on surface normals (e.g.,
-
Smoothing & Resampling
- Each breakline is resampled using B-spline fitting to remove noise
- Sharp curvature regions can be split further using peak detection
-
Optional Projection & Classification
- Fit a global B-spline surface to the entire fragment; project breakline points for refined normals
- Classify breaklines (e.g., rim vs. non-rim) if pot axis data is available
-
Output
- Final breaklines (
*_CompleteBreaklines.xyzor.pcd) – primary output
- Final breaklines (
The axis extraction process is based on the PotSAC algorithm described in Hong et al., 2019. This method provides a robust way to estimate the rotational axis of axially symmetric pottery fragments.
-
Surface Normal Analysis
- Computes the cross product of surface normals to generate axis candidates
- Uses MLESAC-based filtering to identify consistent axis directions
-
Axis Refinement
- Applies weighted optimization to refine the initial axis estimate
- Minimizes the distance between the axis and normal-derived lines
-
Execution in MATLAB
- The implementation is provided in MATLAB scripts
- Main script:
preprocess_new_pots.mhandles the complete axis extraction workflow
minCluster: Minimum cluster size (default: 50)noOfNeighbours: Number of neighbors for region growing (default: 10)smoothnessAngleThreshold: Angle threshold for smoothness (default: 4.0)curvatureThreshold: Threshold for curvature calculation (default: 1.0)
samplingRadius: Radius for uniform samplingnormalEstimationNeighbors: Number of neighbors for normal estimationmergingThreshold: Threshold for cluster merging
breaklineSearchRadius: Neighborhood radius around breakline points (default: 3.0)bSplineOrder: Polynomial order for B-spline smoothing on breaklines (commonly 3)
-
Point Cloud Files
*_Point.pcd: Initial point cloud conversion*_SampledWithNormals.ply: Point cloud with computed normals*_Surface_0.ply/xyz,*_Surface_1.ply/xyz: Segmented surfaces
-
Breakline Files
*_CompleteBreaklines.xyzor.pcd: Refined final boundary curves (primary output of Surface2Breakline)
SfS++ is licensed under the CC-BY-NC-SA-4.0 license limiting any commercial use.
If you use this code in your research, please cite:
@inproceedings{YooandLiu2025SfS,
title={Structure-from-Sherds++: Robust Incremental 3D Reassembly of Axially Symmetric Pots from Unordered and Mixed Fragment Collections},
author={Yoo, Seong Jong and Liu, Sisung and Arshad, Muhammad Zeeshan and Kim, Jinhyeok and Kim, Young Min and Aloimonos, Yiannis and Fermuller, Cornelia and Joo, Kyungdon and Kim, Jinwook and Hong, Je Hyeong},
journal={arXiv preprint arXiv:2502.13986},
year={2025}
}
@inproceedings{HongandYoo_2021_ICCV,
title = {Structure-From-Sherds: Incremental 3D Reassembly of Axially Symmetric Pots From Unordered and Mixed Fragment Collections},
author = {Hong, Je Hyeong and Yoo, Seong Jong and Zeeshan, Muhammad Arshad and Kim, Young Min and Kim, Jinwook},
journal = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {5443-5451}
}
@inproceedings{hong2019potsac,
title={PotSAC: A Robust Axis Estimator for Axially Symmetric Pot Fragments.},
author={Hong, Je Hyeong and Kim, Young Min and Wi, Koang-Chul and Kim, Jinwook},
booktitle={ICCV Workshops},
pages={1421--1428},
year={2019}
}
