当前位置: 首页>>代码示例>>C++>>正文


C++ CameraParameters::principalPoint方法代码示例

本文整理汇总了C++中CameraParameters::principalPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ CameraParameters::principalPoint方法的具体用法?C++ CameraParameters::principalPoint怎么用?C++ CameraParameters::principalPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CameraParameters的用法示例。


在下文中一共展示了CameraParameters::principalPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

StereoFrame::StereoFrame(
  const size_t id,
  const CameraPose& cameraPose, const CameraParameters& calibrationLeft,
  const double stereo_baseline, const CameraParameters& calibrationRight,
  const ImageFeatures& imageFeaturesLeft, const ImageFeatures& imageFeaturesRight,
  bool bFixed
)
  : frameLeft_(Camera(cameraPose, calibrationLeft), imageFeaturesLeft)
  , frameRight_(Camera(ComputeRightCameraPose(cameraPose, stereo_baseline), calibrationRight), imageFeaturesRight)
  , rectified_camera_parameters_({stereo_baseline, calibrationLeft.focalLengths(), calibrationLeft.principalPoint()})
  , bFixed_( bFixed ), id_( id )
{}
开发者ID:snooble,项目名称:sptam,代码行数:12,代码来源:StereoFrame.cpp

示例2: cvToVector

/// Perform the undistortion of LED measurements.
inline std::vector<LedMeasurement>
undistortLeds(std::vector<LedMeasurement> const &distortedMeasurements,
              CameraParameters const &camParams) {
    std::vector<LedMeasurement> ret;
    ret.resize(distortedMeasurements.size());
    auto distortionModel = CameraDistortionModel{
        Eigen::Vector2d{camParams.focalLengthX(), camParams.focalLengthY()},
        cvToVector(camParams.principalPoint()),
        Eigen::Vector3d{camParams.k1(), camParams.k2(), camParams.k3()}};
    auto ledUndistort = [&distortionModel](LedMeasurement const &meas) {
        LedMeasurement ret{meas};
        Eigen::Vector2d undistorted = distortionModel.undistortPoint(
                                          cvToVector(meas.loc).cast<double>());
        ret.loc = vecToPoint(undistorted.cast<float>());
        return ret;
    };
    std::transform(begin(distortedMeasurements), end(distortedMeasurements),
                   begin(ret), ledUndistort);
    return ret;
}
开发者ID:bwrsandman,项目名称:OSVR-Core,代码行数:21,代码来源:VideoBasedTracker.cpp


注:本文中的CameraParameters::principalPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。