Closed rebeen closed 6 years ago
Hi Rebeen,
The issue is these two lines:
X = np.random.random((10, 2)) # 10 points in 2 dimensions
Y = np.random.random((10, 2)) # 10 points in 2 dimensions
You simply cannot register random points to each other. Registration implies correspondence and random points do not correspond to each other.
If you are just testing the code out, you can apply a known transformation to a random point cloud and see if the registration can recover it:
# Known transform (rotation + translation)
R = np.array([[0.866, -0.5], [0.5, 0.866]])
t = np.array([0.5, 1.0])
# Source point cloud
Y = np.random.random((10, 2)) # 10 points in 2 dimensions
# Target point cloud
X = np.dot(Y, R) + np.tile(t, (np.shape(Y)[0], 1))
can I use it for align two Tsne data? do you think it works good for the two TSNE , of course the two tsne has some correspondence between them because they comes from the same data ...... regarding this above code I checked got this result >see attached image ,, thanks for your help
My bad. The order of matrix multiplication for X = R * Y
is X = np.dot(Y, R)
.
Other than providing working examples, e.g. examples/fishRigid2D.py
, I do not know how else I can help you.
please can you help me to apply on my data the two TSNE data that are 2 D
yes know I got result for your data, it is aligned correctly
If you do TY, R_reg, t_reg, s_reg = reg.register(callback)
instead of reg.register(callback)
(line 13), you can check the following to see if the registration has worked:
TY
equal or close to X
?R_reg
, t_reg
and s_reg
close to R
, t
and 1.0
, respectively?If this is true then registration works. I can’t debug a problem that does not exist.
this is the output of TY and X
They are equal, so the registration was successful.
this is all
I dont have any problem with this but my question is how to use this to align two TSNE(2d data) ?
If the transformation between two t-SNE point clouds can be modelled using rigid, affine or deformable transformations, then you can use rigid_registration
, affine_registration
or deformable_registration
using the same approach that you just tried.
Does this make sense theoretically? I am not sure if the transformation between two t-SNE point clouds can be modelled as such. Then again I am not a machine learning expert.
the problem is I dont know about rigid_registration, affine_registration or deformable_registration . also I am confusing about the registration word , I think you meant align right ?
usually for alignment people use Procrustes analysis and Iterative closes point but I dont know about this algorithm
Rebeen you either need to take a course in point cloud registration or ask your graduate supervisor to help you with understanding underlying concepts. Unfortunately I do not have enough bandwidth to help you with your research.
This might be a good starting point: https://en.wikipedia.org/wiki/Point_set_registration Or this survey paper: https://orca.cf.ac.uk/47333/1/ROSIN%20registration%20of%203d%20point%20clouds%20and%20meshes.pdf
Good luck with your research!
thank you
I want to align two TSNE data using this package could you tell me how to use this package ?