I'm working on getting the mapping the object in 3D scene, and I'm using neural renderer(https://github.com/daniilidis-group/neural_renderer) The problem is when I use the same camera calibration matrix, the same 3D model and the same camera pose, I get the below image
I am using the same calibration matrix and the same model, so what could be wrong ? I have premultiplied the correction matrix which rotates the camera by x-axis by 180 degrees to bring the blender camera to the pinhole camera.
R00 = [1,0,0; 0,-1,0; 0,0,-1]; R = [-0.5, 0, 0.866; %this is the rotation of the camera in 0.866, 0, 0.5; blender 0.0, 1.0, 0]; t = [1.840; 1.079; 0.706]; %translation of the camera in blender K = [280 0 128 0 280 128 0 0 1]; Rpinhole = R*R0; Xcamframe = Rpinhole' * (X - t); %where X are the points on the chair x = K*(Xcamframe); x = bsxfun(@rdivide,x,x(3,:)); %dividing by the third row
Also the chair comes as inverted for some reason, which I have manually inverted.