-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from neka-nat/color_cpd
add color cpd
- Loading branch information
Showing
12 changed files
with
155 additions
and
53 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import numpy as np | ||
import open3d as o3 | ||
import transforms3d as t3d | ||
from probreg import cpd | ||
from probreg import callbacks | ||
import logging | ||
log = logging.getLogger('probreg') | ||
log.setLevel(logging.DEBUG) | ||
|
||
voxel_size = 0.05 | ||
source = o3.io.read_point_cloud("frag_115.ply") | ||
source = source.voxel_down_sample(voxel_size=voxel_size) | ||
|
||
target = o3.io.read_point_cloud("frag_116.ply") | ||
target = target.voxel_down_sample(voxel_size=voxel_size) | ||
|
||
cbs = [callbacks.Open3dVisualizerCallback(source, target)] | ||
tf_param, _, _ = cpd.registration_cpd(source, target, | ||
callbacks=cbs, use_color=True) | ||
|
||
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)), | ||
tf_param.scale, tf_param.t) |
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
from . import (bcpd, callbacks, cpd, filterreg, gmmtree, l2dist_regs, log, | ||
math_utils, transformation) | ||
from . import bcpd, callbacks, cpd, filterreg, gmmtree, l2dist_regs, log, math_utils, transformation | ||
from .version import __version__ |
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
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
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
Oops, something went wrong.