-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh Clustering for 3D Module #25597
Open
starga2er777
wants to merge
15
commits into
opencv:5.x
Choose a base branch
from
starga2er777:spc
base: 5.x
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # modules/3d/include/opencv2/3d.hpp # modules/3d/src/pointcloud/io_base.cpp # modules/3d/src/pointcloud/io_base.hpp # modules/3d/src/pointcloud/load_point_cloud.cpp # modules/3d/src/spc.cpp # modules/3d/test/test_spc.cpp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merged with: opencv/opencv_extra#1178
Mesh Spectral Clustering for 3D Module
Description
This pull request introduces a mesh clustering algorithm based on spectral clustering. Inspired by the structure outlined in the paper "Segmentation of 3D Meshes through Spectral Clustering" by Rong Liu and Hao Zhang, with some modifications, the algorithm effectively clusters meshes.
A new class will be created in 3d module of branch 5.x to implement all related clustering algorithms.
New interfaces will be added:
Class constructor
Method
Details
The algorithm flow is roughly shown in the figure below:
The algorithm mainly contains following steps:
cv::loadMesh
, the algorithm takes in the vertices and triangular faces as input.loadMesh
does not convert mesh faces into triangular mesh as Open3D does.)Implementation
In the 3D module, two additional files have been introduced to support the algorithm:
modules/3d/include/opencv2/3d.hpp
, theSpectralCluster
class is defined and documented. This class includes the declarations of functions and their parameters.modules/3d/src/spc.cpp
, the methods of theSpectralCluster
class are implemented.modules/3d/test/test_spc.cpp
, a test for theSpectralCluster
class is created to ensure its functionality.Results
The algorithm has been tested on A Benchmark for 3D Mesh Segmentation.
As shown in the figure, spectral clustering has a better performance over many prevailing algorithms.
Here are some of the cluster results:
Reference
Rong Liu and Hao Zhang, "Segmentation of 3D meshes through spectral clustering," 12th Pacific Conference on Computer Graphics and Applications, 2004. PG 2004. Proceedings., Seoul, South Korea, 2004, pp. 298-305, doi: 10.1109/PCCGA.2004.1348360.
Xiaobai Chen, Aleksey Golovinskiy, and Thomas Funkhouser, A Benchmark for 3D Mesh Segmentation ACM Transactions on Graphics (Proc. SIGGRAPH), 28(3), 2009.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.