- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我有一个服务器功能,可以从图像中检测和估计 aruco 标记的姿势。
使用函数 estimatePoseSingleMarkers
我找到了旋转和平移向量。我需要在带有 ARCore 的 Android 应用程序中使用此值来创建姿势。
文档说 Pose 需要两个 float 组(旋转和平移):https://developers.google.com/ar/reference/java/arcore/reference/com/google/ar/core/Pose .
float[] newT = new float[] { t[0], t[1], t[2] };
Quaternion q = Quaternion.axisAngle(new Vector3(r[0], r[1], r[2]), 90);
float[] newR = new float[]{ q.x, q.y, q.z, q.w };
Pose pose = new Pose(newT, newR);
在此姿势中放置的 3D 对象的位置是完全随机的。
我做错了什么?
最佳答案
cv::aruco::estimatePoseSingleMarkers
( link ) 返回 Rodrigues 中的旋转向量格式。按照文档
w = norm( r ) // angle of rotation in radians
r = r/w // unit axis of rotation
因此
float w = sqrt( r[0]*r[0] + r[1]*r[1] + r[2]*r[2] );
// handle w==0.0 separately
// Get a new Quaternion using an axis/angle (degrees) to define the rotation
Quaternion q = Quaternion.axisAngle(new Vector3(r[0]/w, r[1]/w, r[2]/w), w * 180.0/3.14159 );
除了提到的直角旋转外,应该可以工作。也就是说,如果镜头参数被正确地或达到一定的精度馈送到 estimatePoseSingleMarkers
。
关于android - ARCore Pose 和 Aruco estimatePoseSingleMarkers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54078932/
我已经完成了标记的姿势估计并获得了 rvec 和 tvec 值。我不知道如何找到它的中心,因为我需要绘制一个需要中心值的圆柱体。 我该怎么做? 最佳答案 标记的 tvec 是标记从原点的平移 (x,y
我正在运行一个 Ubuntu 虚拟机,Python 3.6.1,Anaconda 4.4.0(64 位)。我正在尝试运行 the code on this website .当我尝试使用 导入cv2.
您好,我在使用 aruco 时遇到错误。我只是想从教程中获取一个例子。我按照教程做了一切,但我得到: /home/pi/Programs/markerDetection/markerDetec
我的应用程序接收可以具有 bayer_rggb8 编码的相机图像。我需要将这些图像转换为 bgr8/rgb8/mono8 吗?或者 Aruco 可以检测拜耳编码的 cv::Mat 中的标记吗? 我使用
我正在尝试使用 Aruco 标记找到相机的方向。从旋转矩阵中提取的欧拉角在超过某个点后是不稳定的。随着相机与标记的距离增加,相机的偏航角值就不稳定。标记上的“Z”轴翻转。欧拉角不稳定,每一帧都不一样,
我一直在使用 Python 的 OpenCV 库,使用 ArUco 进行对象跟踪。 目标是获取 ArUco 标记中心的 x/y/z 坐标,以及相对于校准相机的角度。 我能够使用目前的代码在 aruco
我将 ArUco 库与 OpenCV 一起使用(更多信息 here),但我找不到从头开始构建和运行程序的方法。 安装库后,我可以访问不同的示例,但是如果我想创建一个新文件并在其中添加库 header
我一直在尝试使用可以提供纹理的客户摄像头来统一执行AruCo或标记检测,这不是普通摄像头,因此您不能使用该包装随附的常规webcamtexture,我一直在尝试可以想象的一切但这对我不起作用。我已经测
我有两张照片真的很像这个被正确识别为 5x5_250 字典的标记 209 虽然这另一个非常相似但无法识别,它是同一个 5x5_250 字典的标记 207: 而且标记 207 在另一张照片中被识别出来了
我正在使用虚拟工作室创建一个增强现实系统,该系统仅用于检测表面的方向和倾斜度。我是 C++ 的新手,想问问是否有人可以提供有关如何将 aruco 库实现到 visual studio 中的说明。 我已
我有一个用于检测 aruco 标记的程序,我想使用 1 个标记他的姿势从具有多个 aruco ID 的相机图像进行计算。 我有一个 aruco id 为 256、257、258 的板问题是,当看到 a
我是 ArUco 的新手,我在尝试理解输出中的单位时遇到了一些问题: 817=(527.126,235.966) (525.665,210.056) (552.459,208.619) (553.24
我正在尝试使用 OpenCV 4.1.1 和 Aruco 构建一个简单的增强现实应用程序。目标是将图像叠加在标记之上,但图像超出标记的边缘。 我已经校准了我的相机并获得了相机矩阵和畸变系数。通过使用
为 ArUco 进行相机标定有多重要?如果我不校准相机怎么办?如果我使用其他相机的校准数据怎么办?如果相机焦点发生变化,是否需要重新校准?为消费者应用进行校准的实用方法是什么? 最佳答案 在回答您的问
是否可以为 ArUco 训练新的标记?例如,在 ARToolKit 中,可以创建新的标记模式并使用 mk_patt.exe 训练它们,它会生成可用于检测模式的模式文件。是否可以在 ArUco 库中做类
我正在使用 ArUco 标记来校正透视图并计算图像的大小。在此图像中,我知道标记外边缘之间的确切距离,并使用它来计算黑色矩形的大小。 我的问题是 aruco::detectMarkers 并不总能识别
我使用函数cv.aruco.estimatePoseSingleMarkers()来获取rvec和tvec。使用这两个向量如何获得相机相对于 Aruco 标记的姿势? while (True):
我正在尝试计算 aruco 标记和相机之间的精确(3 厘米误差率是可以接受的)距离。我使用 python、opencv 和 aruco。我可以检测到它们(标记端为 0.023 米,即 2.3 厘米)但
我正在使用来自 OpenCV Contrib 的 ChAruCo 标记跟踪。我想跟踪多个板,但创建标记板的机制并不像我期望的那样。 我想象的是有一个字典(比如说,DICT_4X4_50)使用字典中不同
引用原文question ,当使用相对较大的长度标记(例如 0.65m)时,相机的位姿精度是否会提高? 最佳答案 使用单个标记会出现原题中描述的所有问题,无论标记的大小如何。如果你按比例因子 F 放大
我是一名优秀的程序员,十分优秀!