gpt4 book ai didi

boofcv.alg.geo.calibration.Zhang99CalibrationMatrixFromHomographies.process()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:38:22 28 4
gpt4 key购买 nike

本文整理了Java中boofcv.alg.geo.calibration.Zhang99CalibrationMatrixFromHomographies.process()方法的一些代码示例,展示了Zhang99CalibrationMatrixFromHomographies.process()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zhang99CalibrationMatrixFromHomographies.process()方法的具体详情如下:
包路径:boofcv.alg.geo.calibration.Zhang99CalibrationMatrixFromHomographies
类名称:Zhang99CalibrationMatrixFromHomographies
方法名:process

Zhang99CalibrationMatrixFromHomographies.process介绍

[英]Given a set of homographies computed from a sequence of images that observe the same plane it estimates the camera's calibration.
[中]给定从观察同一平面的一系列图像计算出的一组同形图,它估计相机的校准。

代码示例

代码示例来源:origin: org.boofcv/calibration

/**
 * Find an initial estimate for calibration parameters using linear techniques.
 */
protected Zhang99ParamAll initialParam( List<CalibrationObservation> observations )
{
  status("Estimating Homographies");
  List<DenseMatrix64F> homographies = new ArrayList<>();
  List<Se3_F64> motions = new ArrayList<>();
  for( CalibrationObservation obs : observations ) {
    if( !computeHomography.computeHomography(obs) )
      return null;
    DenseMatrix64F H = computeHomography.getHomography();
    homographies.add(H);
  }
  status("Estimating Calibration Matrix");
  computeK.process(homographies);
  DenseMatrix64F K = computeK.getCalibrationMatrix();
  decomposeH.setCalibrationMatrix(K);
  for( DenseMatrix64F H : homographies ) {
    motions.add(decomposeH.decompose(H));
  }
  status("Estimating Radial Distortion");
  computeRadial.process(K, homographies, observations);
  double distort[] = computeRadial.getParameters();
  return convertIntoZhangParam(motions, K,optimized.assumeZeroSkew, distort,
      optimized.includeTangential);
}

代码示例来源:origin: org.boofcv/boofcv-calibration

/**
 * Find an initial estimate for calibration parameters using linear techniques.
 */
protected boolean linearEstimate(List<CalibrationObservation> observations , Zhang99AllParam param )
{
  status("Estimating Homographies");
  List<DMatrixRMaj> homographies = new ArrayList<>();
  List<Se3_F64> motions = new ArrayList<>();
  for( CalibrationObservation obs : observations ) {
    if( !computeHomography.computeHomography(obs) )
      return false;
    DMatrixRMaj H = computeHomography.getHomography();
    homographies.add(H);
  }
  status("Estimating Calibration Matrix");
  computeK.process(homographies);
  DMatrixRMaj K = computeK.getCalibrationMatrix();
  decomposeH.setCalibrationMatrix(K);
  for( DMatrixRMaj H : homographies ) {
    motions.add(decomposeH.decompose(H));
  }
  status("Estimating Radial Distortion");
  computeRadial.process(K, homographies, observations);
  double distort[] = computeRadial.getParameters();
  convertIntoZhangParam(motions, K,distort, param);
  return true;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com