MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / getBlenderCameraMatrix

Function getBlenderCameraMatrix

plugins/videobasedtracker/GetCameraMatrix.h:64–70  ·  view source on GitHub ↗

@brief Compute a camera matrix given an image width and height in pixels, "sensor width" in mm, and "focal length" in mm

Source from the content-addressed store, hash-verified

62 /// @brief Compute a camera matrix given an image width and height in
63 /// pixels, "sensor width" in mm, and "focal length" in mm
64 inline CameraMatrix getBlenderCameraMatrix(double width, double height,
65 double mmSensorWidth,
66 double mmFocalLength) {
67 auto focalLength = mmFocalLength * (width / mmSensorWidth);
68 return getCameraMatrix(Eigen::Vector2d(width / 2.0, height / 2.0),
69 focalLength);
70 }
71
72} // namespace vbtracker
73} // namespace osvr

Callers

nothing calls this directly

Calls 1

getCameraMatrixFunction · 0.85

Tested by

no test coverage detected