Registering pointclouds from two stereocameras

Hi, I have two calibrated stereocameras located on a circle pointing at the same object (the object is at the centre of the circle). Each stereocamera scans different slice of the object creating 3D pointcloud of the slice.(Please see the picture attached).
In the picture above, the blue section is scanned area by camera1, green is scanned area by camera2 and yellow section is overlap of these two areas. I have Rotation ([R]) and translation([t]) Of camera 2 relative to camera 1, using a checkerboard and Matlab stereo-vision calibration App. I am going to use R and t to transform pointcloud2 and align it with pointcloud1 to make the complete 3D model of the object.This is what I am doing in my code, I make the transformation matrix first:
M = [[R;T],[0;0;0;1]];
and then transform pointcloud2 as below:
PTCLOUD2_New = M * PTCLOUD2_Old';
Where PTCLOUD2_Old has an array of ones in last column to make a n*4 matrix. After this transformation pointcloud2 is transformed to new coordinate however the orientation of transformed pointcloud doesn't look right. Please let me know what I am missing here. Thanks,Navid

2 Comments

Matt J
Matt J on 3 Oct 2017
Edited: Matt J on 3 Oct 2017
however the orientation of transformed pointcloud doesn't look right
How can we know what this means? I do like the picture, though.
Thanks for your quick reply. As you see in the pic attached these pointclouds are slices of the same cylinder. The green one is not aligned correctly after transformation to make a bigger slice combined with blue one. I hope it makes sense.

Sign in to comment.

Answers (1)

PTCLOUD2_New = PTCLOUD2_Old * M;

2 Comments

Matt J
Matt J on 3 Oct 2017
Edited: Matt J on 3 Oct 2017
@Navid,
Did this not work?
It didnt work. I am trying to re calculate R and t again to see what happens. The other point is; I am going to use
ptCloudOut = pctransform(ptCloudIn,tform)
To transform my pointcloud (currently I am transforming x,y,z data using [R]) and to do so I need to break my [R] into three Euler angles to rotate my pointcloud separately around X,Y and Z axes. I hope it makes sense.

Sign in to comment.

Asked:

on 3 Oct 2017

Commented:

on 5 Oct 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!