本文整理汇总了C++中SimpleCamera::n方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleCamera::n方法的具体用法?C++ SimpleCamera::n怎么用?C++ SimpleCamera::n使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleCamera
的用法示例。
在下文中一共展示了SimpleCamera::n方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: poses_are_similar
bool RobustViconTracker::poses_are_similar(const SimpleCamera& cam1, const SimpleCamera& cam2, double distanceThreshold, double angleThreshold)
{
// Calculate the distance between the positions of the two cameras, and the angles between their corresponding camera axes.
double distance = (cam1.p() - cam2.p()).norm();
double nAngle = angle_between(cam1.n(), cam2.n());
double uAngle = angle_between(cam1.u(), cam2.u());
double vAngle = angle_between(cam1.v(), cam2.v());
// Check the similarity of the camera poses by comparing the aforementioned distance and angles to suitable thresholds.
return distance < distanceThreshold && nAngle < angleThreshold && uAngle < angleThreshold && vAngle < angleThreshold;
}