facebookresearch/House3D

Camera internal matrix

DrifterFun opened this issue · 2 comments

Could you tell me how to calculate internal matrix of depth camera in House3D?

The camera matrix was computed here:

glm::mat4 getCameraMatrix(const Geometry& geo) const {
glm::mat4 projection = glm::perspective(
glm::radians(vertical_fov),
(float)geo.w / geo.h, near, far);
glm::mat4 view = getView();
return projection * view;
}

The values of vertical_fov, near, far are written in the file.

It does not explicitly compute an intrinsic matrix, but use a different form (the OpenGL "projection matrix", i.e. the glm::perspective function). You can check some online resources on about this function, e.g.: http://kgeorge.github.io/2014/03/08/calculating-opengl-perspective-matrix-from-opencv-intrinsic-matrix

Thanks for your help. The answer solve my problem. ^_^