MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / setParameters

Method setParameters

simulation/src/camera.cpp:32–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void
33pcl::simulation::Camera::setParameters(int width,
34 int height,
35 float fx,
36 float fy,
37 float cx,
38 float cy,
39 float z_near,
40 float z_far)
41{
42 width_ = width;
43 height_ = height;
44 fx_ = fx;
45 fy_ = fy;
46 cx_ = cx;
47 cy_ = cy;
48 z_near_ = z_near;
49 z_far_ = z_far;
50
51 // clang-format off
52 float z_nf = (z_near_-z_far_);
53 projection_matrix_ << 2.0f*fx_/width_, 0, 1.0f-(2.0f*cx_/width_), 0,
54 0, 2.0f*fy_/height_, 1.0f-(2.0f*cy_/height_), 0,
55 0, 0, (z_far_+z_near_)/z_nf, 2.0f*z_near_*z_far_/z_nf,
56 0, 0, -1.0f, 0;
57 // clang-format on
58}
59
60void
61pcl::simulation::Camera::initializeCameraParameters()

Callers 6

ModelMethod · 0.45
getCloudPCLZFMethod · 0.45
SetUpFunction · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by 2

SetUpFunction · 0.36
TESTFunction · 0.36