简体   繁体   English

openCV中的3D翘曲用于标记检测

[英]3-d warping in openCV for marker detection

I am working on a code for marker detection.from my web cam i am taking input image of marker ,this marker inside it has one reference point .I have to detect that reference point.for that i need some warping method.i know how to do the 2-d warping via cvGetPerspectiveTransform() and cvWarpPerspective() in opencv.but i want to ask that is there any way by which i can generate some 3-d perspective transform matrix that can be used in 3-d warping. 我正在编写用于标记检测的代码。从网络摄像头中,我正在获取标记的输入图像,该标记内部有一个参考点。我必须检测该参考点。为此,我需要一些变形方法。我知道如何通过opencv中的cvGetPerspectiveTransform()cvWarpPerspective()进行2-d变形,但是我想问问有什么方法可以生成可以用于3-d变形的3-d透视变换矩阵。

 cvGetPerspectiveTransform(rectangles[rectIndex].OuterCorner, dstCorners,map_matrix);
 cvWarpPerspective(workGrayImg,projectedImg,map_matrix,CV_INTER_LINEAR |CV_WARP_FILL_OUTLIERS ,         
 cvScalarAll (0));

There is a small library called ArUco that does what You are trying to do,I guess. 我猜有一个叫做ArUco的小图书馆,它可以做您想要做的事情。 As it is open source You can just check how they did it. 由于它是开源的,您只需检查他们的操作方式即可。

As I understand You need to find the marker first, and then make it square, so You can read the info contained inside. 据我了解,您需要先找到标记,然后再使其成为正方形,以便您可以阅读其中包含的信息。 You can also look for methods used for QRcodes. 您也可以查找用于QRcode的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM