Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is hte meaning of: TheMarkers[0].Tvec.at<vec3f>(0,0)[0];

Hey!

I would like to ask a question. I am using Aruco AR library, and I would like to define the coordinates of a marker. A part of my c++ code:

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];
double y_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[1];
double z_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[2];

To be honest I do not know what is the exact meaning of these lines. What I have so far figured out using stackoverflow and this site: (Let's see only the first line):

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];

TheMarkers[0]: the "0" index means that we want to inquire/get the first marker detected. It is clear.

Tvec: This is the 3D translation vector with x,y,z translation values. So how far is my marker relating to my camera coordinate system.

The next would be my first question: What does "at" mean at "Tvec.at"? I found an information on the internet about what does Vec3f mean: The Vec3f class provides a vector object for 3 dimensional locations or RGB pixel values.

After that the (0,0) part is also vague to me. Why should I use (0,0)?

The index at the end ([0]) is clear for me...

Thanks in advance for the answer!

What is hte the meaning of: TheMarkers[0].Tvec.at<vec3f>(0,0)[0];

Hey!

I would like to ask a question. I am using Aruco AR library, and I would like to define the coordinates of a marker. A part of my c++ code:

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];
double y_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[1];
double z_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[2];

To be honest I do not know what is the exact meaning of these lines. What I have so far figured out using stackoverflow and this site: (Let's see only the first line):

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];

TheMarkers[0]: the "0" index means that we want to inquire/get the first marker detected. It is clear.

Tvec: This is the 3D translation vector with x,y,z translation values. So how far is my marker relating to my camera coordinate system.

The next would be my first question: What does "at" mean at "Tvec.at"? I found an information on the internet about what does Vec3f mean: The Vec3f class provides a vector object for 3 dimensional locations or RGB pixel values.

After that the (0,0) part is also vague to me. Why should I use (0,0)?

The index at the end ([0]) is clear for me...

Thanks in advance for the answer!

click to hide/show revision 3
retagged

updated 2015-04-14 14:37:24 -0600

berak gravatar image

What is the meaning of: TheMarkers[0].Tvec.at<vec3f>(0,0)[0];

Hey!

I would like to ask a question. I am using Aruco AR library, and I would like to define the coordinates of a marker. A part of my c++ code:

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];
double y_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[1];
double z_t = TheMarkers[0].Tvec.at<Vec3f>(0,0)[2];

To be honest I do not know what is the exact meaning of these lines. What I have so far figured out using stackoverflow and this site: (Let's see only the first line):

double x_t = -TheMarkers[0].Tvec.at<Vec3f>(0,0)[0];

TheMarkers[0]: the "0" index means that we want to inquire/get the first marker detected. It is clear.

Tvec: This is the 3D translation vector with x,y,z translation values. So how far is my marker relating to my camera coordinate system.

The next would be my first question: What does "at" mean at "Tvec.at"? I found an information on the internet about what does Vec3f mean: The Vec3f class provides a vector object for 3 dimensional locations or RGB pixel values.

After that the (0,0) part is also vague to me. Why should I use (0,0)?

The index at the end ([0]) is clear for me...

Thanks in advance for the answer!