Comments (6)
It's KdTree.
from scipy.spatial import KDTree
target_tree = KDTree(target, leafsize=10)
rmse = math_utils.compute_rmse(source, target_tree)
from probreg.
Hi @sandwich25 ,
Thank you for the question.
The RMSE function is math_utils.compute_rmse
.
from probreg.
what does the target_tree represents?
from probreg.
Thanks!
from probreg.
hi i cant use rmse , it say expected 2 but got 0 m I want to get accuracy or a method to calculate similarity: this is my code:
import copy
import numpy as np
import open3d as o3d
import transforms3d as t3d
from numpy.linalg import norm
from probreg import cpd, filterreg
# load source and target point cloud
source = o3d.io.read_point_cloud("./C.ply")
target = o3d.io.read_point_cloud("./E_cut.ply")
# transform target point cloud
th = np.deg2rad(30.0)
target.transform(np.array([[np.cos(th), -np.sin(th), 0.0, 0.0],
[np.sin(th), np.cos(th), 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, 1.0]]))
source = source.voxel_down_sample(14)
target = target.voxel_down_sample(7)
threshold = 0.02
trans_init = np.asarray([[0.862, 0.011, -0.507, 0.5],
[-0.139, 0.967, -0.215, 0.7],
[0.487, 0.255, 0.835, -1.4], [0.0, 0.0, 0.0, 1.0]])
import time
# compute cpd registration
start_time = time.time()
tf_param, _, _ = cpd.registration_cpd(source, target)
result = copy.deepcopy(source)
result.points = tf_param.transform(result.points)
print("--- %s seconds ---" % (time.time() - start_time))
# draw result
source.paint_uniform_color([1, 0, 0])
target.paint_uniform_color([0, 1, 0])
result.paint_uniform_color([0, 0, 1])
#o3d.visualization.draw_geometries( [result,target])
#resultglobaltran = tf_param
#gfit=o3d.pipelines.registration.evaluate_registration(source,target,threshold,tf_param.rot)
#fitness=gfit.fitness
#rmse=gfit.inlier_rmse
#cdots=len(gfit.correspondence_set)
print("result: ", np.rad2deg(t3d.euler.mat2euler(tf_param.rot)),
tf_param.scale, tf_param.t)
from scipy.spatial import KDTree
target_tree = KDTree(target, leafsize=10)
rmse = math_utils.compute_rmse(source, target_tree)
print("Error (m): ")
print(norm(np.rad2deg(t3d.euler.mat2euler(tf_param.rot) - tf_param.t)))
from probreg.
@neka-nat @jwindhager @sandwich25
from probreg.
Related Issues (20)
- Performance metric HOT 3
- ImportError: cannot import name '_math' HOT 1
- Contrained nonrigid CPD not moving points coherently
- Question about initialization of nonrigid transformation
- calculate the deformation field of point cloud and apply it to the 3D CT image
- bcpd_nonrigid.py does not consider local shapes.
- rigid 2d point set alignment doesn't converge well enough
- performance improvements for CPD HOT 1
- One important parameter is missing HOT 1
- scaling issue with registration_bcpd
- GMM-Tree Code. HOT 1
- [BUG] Error encountered using registration_cpd when using cuda HOT 2
- ImportError: cannot import name '_math' from partially initialized module 'probreg' (most likely due to a circular import) (/home/optics/file/shp/probreg-master/probreg/__init__.py) HOT 3
- bcpd_nonrigid.py
- 3D CPD registration example issue
- Non-rigid CPD/BCPD fails to scale points properly
- Implementation of LSG-CPD
- Impelemtation of Generalized CPD
- error when import probreg after pip installtion on ubuntu 20.04 + python3.6 HOT 1
- cpd.NonRigidCPD issue with swapping source and target
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from probreg.