0

I'm doing a image 3D projection, but when I use the iwarp function the result is a multidimensional matrix, I'm using:

color1 = imread('color1.jpg') % 480x640x3 image RBG

%4X4 projection matrix
Mx = makehgtform('xrotate',-0.01970);
My = makehgtform('yrotate',0.01729);
Mz = makehgtform('zrotate',-0.00717);
M = Mx*My*Mz;
M(1,4) = -28.54007;
M(2,4) = -2.00470;
M(3,4) = 4.37353;
T = affine3d(M);
%Do transform
Color_Rectified = imwarp(color1,T); %485X644x24 

At the end, the Color_Rectified size is 485X644x24, the idea is to get the image rotated/translated in X,Y,Z and RGB, how to do this?

Dinl
  • 83
  • 1
  • 7
  • What is `A` in `T = affine3d(A)`? – beaker Sep 10 '14 at 16:33
  • Sorry, is M, there is fixed. – Dinl Sep 10 '14 at 16:39
  • What results are you expecting to get by performing a 3d rotation on a 2d image? – beaker Sep 10 '14 at 16:49
  • The result that I expected is an image projected into another camera coordinate system, the M matrix is the extrinsic parameters for camera1 into camera2. – Dinl Sep 10 '14 at 17:16
  • For that you need a 3d image with depth information. All you're doing with a 2d image is rotating a 2d plane in 3d space. I don't think this is what you want. – beaker Sep 10 '14 at 17:18
  • I have the depth image from IR kinectcamera, the RGB image doesn't fit with the IR, I did the calibration for both cameras, after I found the transformation matrix between 2 cameras, and then I thought transform the RGB image to fit into the IR image. – Dinl Sep 10 '14 at 17:38
  • Sorry, I don't have any experience with kinect depth maps, but you might want to check out [this post](http://stackoverflow.com/questions/25757940/processing-kinect-depth-data-in-matlab) and the link in the comments. – beaker Sep 10 '14 at 18:18
  • No, that's no what I'm searching for, thank you for you time! – Dinl Sep 10 '14 at 19:18

0 Answers0