Ahhh, p and q are (3 x m) and (3 x n). My dataset was (m x 3). Think thats sorted. But now I get another error : I replaced all the tilde's with 'dummy' but there seems to be a division by zero error. I now get this response :
??? Error using ==> svd
Input to SVD must not contain NaN or Inf.
Error in ==> icp>eq_point at 345
[U,dummy,V] = svd(N); % singular value decomposition
Error in ==> icp at 231
[R,T] = eq_point(q(:,q_idx),pt(:,p_idx), weights(p_idx));
What do I do here?I have real 3D point clouds to register. Thanks again for your code and help
Adding _SECURE_SCL=1 to COMPFLAGS into mexopts.bat file solved theproblem for me with this error.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility(287) : error C2582: 'operator '='
I am using Matalb2012b-64bit, VS2010-Professional, and OpenCV 2.4.5.