gpt4 book ai didi

boofcv.alg.geo.calibration.Zhang99ComputeTargetHomography类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 02:31:31 25 4
gpt4 key购买 nike

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

Zhang99ComputeTargetHomography介绍

[英]Given a description of the calibration grid and a set of observations compute the associated Homography. First a linear approximation is computed follow by non-linear refinement. Part of calibration process described in [1].

[1] Zhengyou Zhang, "Flexible Camera Calibration By Viewing a Plane From Unknown Orientations,", International Conference on Computer Vision (ICCV'99), Corfu, Greece, pages 666-673, September 1999.99
[中]给出校准网格的描述和一组观测值,计算相关的单应性。首先计算线性近似值,然后进行非线性求精。[1]中描述的校准过程的一部分。
[1] 张正友,“通过从未知方向观察飞机进行柔性摄像机校准”,国际计算机视觉会议(ICCV'99),希腊科孚,第666-673页,1999年9月

代码示例

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

public boolean estimateCameraPose(BufferedImage leftEye)
{
 if (!hasIntrinsic)
   return false;
 gray.reshape(leftEye.getWidth(), leftEye.getHeight());
 ConvertBufferedImage.convertFrom(leftEye, gray);
 if (!target.process(gray))
   return false;
 if (!computeH.computeHomography(target.getDetectedPoints()))
   return false;
 DenseMatrix64F H = computeH.getHomography();
 targetToOrigin.set(decomposeH.decompose(H));
 return true;
}

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

/**
 * Configures calibration process.
 *
 * @param layout Layout of calibration points on the target
 * @param assumeZeroSkew Should it assumed the camera has zero skew. Typically true.
 * @param numRadialParam Number of radial distortion parameters to consider.  Typically 0,1,2.
 * @param includeTangential Should it include tangential distortion?
 */
public CalibrationPlanarGridZhang99(List<Point2D_F64> layout,
                  boolean assumeZeroSkew,
                  int numRadialParam,
                  boolean includeTangential )
{
  this.layout = layout;
  computeHomography = new Zhang99ComputeTargetHomography(layout);
  computeK = new Zhang99CalibrationMatrixFromHomographies(assumeZeroSkew);
  computeRadial = new RadialDistortionEstimateLinear(layout,numRadialParam);
  optimized = new Zhang99ParamAll(assumeZeroSkew,numRadialParam,includeTangential);
}

代码示例来源:origin: us.ihmc/ImageProcessing

Zhang99ComputeTargetHomography computeH = new Zhang99ComputeTargetHomography(target.getLayout());
Zhang99DecomposeHomography decomposeH = new Zhang99DecomposeHomography();
if( !computeH.computeHomography(target.getDetectedPoints()) )
  throw new RuntimeException("Can't compute homography");
DenseMatrix64F H = computeH.getHomography();

代码示例来源:origin: us.ihmc/ihmc-perception

Zhang99ComputeTargetHomography computeH = new Zhang99ComputeTargetHomography(target.getLayout());
if( !computeH.computeHomography(detector.getDetectedPoints()) )
  throw new RuntimeException("Can't compute homography");
DenseMatrix64F H = computeH.getHomography();

代码示例来源:origin: us.ihmc/IHMCPerception

Zhang99ComputeTargetHomography computeH = new Zhang99ComputeTargetHomography(target.getLayout());
if( !computeH.computeHomography(detector.getDetectedPoints()) )
  throw new RuntimeException("Can't compute homography");
DenseMatrix64F H = computeH.getHomography();

代码示例来源: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

/**
 * Configures calibration process.
 *
 * @param layout Layout of calibration points on the target
 * @param intrinsicParam
 */
public CalibrationPlanarGridZhang99(List<Point2D_F64> layout, Zhang99IntrinsicParam intrinsicParam)
{
  this.layout = layout;
  computeHomography = new Zhang99ComputeTargetHomography(layout);
  computeK = new Zhang99CalibrationMatrixFromHomographies(intrinsicParam.assumeZeroSkew);
  computeRadial = new RadialDistortionEstimateLinear(layout,intrinsicParam.getNumberOfRadial());
  optimized = new Zhang99AllParam(intrinsicParam,0);
  initial = optimized.createLike();
}

代码示例来源: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;
}

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