I use opencv and openframework (i.e. opengl) to compute a camera (world and projection transformation matrix) from an image (and then multiple images for triangulation).
For opencv purposes, the "floor plan" becomes an object (ie a chessboard) with a 0.0.0 center of the world. The world / gender values are known, so I need to get information about the forecast (distortion factors, fov, etc.) and the external coordinates of the camera.

I compared the presentation positions of these plan points in my two-dimensional image in the normalized viewing space ([0,0] left up. [1,1] bottom right).
( / ) xz, -y up, xy ( , z-up ...) opencv,
ofMatrix4x4 gWorldToCalibration(
1, 0, 0, 0,
0, 0, 1, 0,
0, 1, 0, 0,
0, 0, 0, 1
);
1,1 ImageSize .
CV_CALIB_FIX_ASPECT_RATIO|V_CALIB_FIX_K4|CV_CALIB_FIX_K5
calibrateCamera , ( 0.003).
calibrationMatrixValues FOV, 50 , , .
, ... , solvePnP, ( )
cv::Mat& RotationVector = ObjectRotations[0];
cv::Mat& TranslationVector = ObjectTranslations[0];
cv::Mat expandedRotationVector;
cv::Rodrigues(RotationVector, expandedRotationVector);
cv::Mat Rt = cv::Mat::zeros(4, 4, CV_64FC1);
for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++)
Rt.at<double>(y, x) = expandedRotationVector.at<double>(y, x);
Rt.at<double>(0, 3) = TranslationVector.at<double>(0, 0);
Rt.at<double>(1, 3) = TranslationVector.at<double>(1, 0);
Rt.at<double>(2, 3) = TranslationVector.at<double>(2, 0);
Rt.at<double>(3, 3) = 1.0;
, ( , , , )
ofMatrix4x4 ModelView;
for ( int r=0; r<4; r++ )
for ( int c=0; c<4; c++ )
ModelView(r,c) = Rt.at<double>( c, r );
(y ), .
ofMatrix4x4 gCalibrationToWorld = gWorldToCalibration.getInverse();
ModelView *= gCalibrationToWorld;
, ... , ...
// invert y and z planes for -/+ differences between opencv and opengl
ofMatrix4x4 InvertHandednessMatrix(
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, -1, 0,
0, 0, 0, 1
);
ModelView *= InvertHandednessMatrix;
, , - , (0,0,0)
ModelView = ModelView.getInverse();

, . , - Y, , , ... .
, , .
SO, , , , , -, , , - ?
- ?
1 - ...
XY (Z up), openCV. (gWorldToCalibration ).
- , , , (, , )

Update2 -
, ; , 1,1, , imageSize , , ... , ( - , z = 0 )
, ( 1,1 640 480. 640,480)
, , ...