0

I have a really easy (maybe stupid) question. I have following code to detect aruco markers with the aruco library:

MarkerDetector MDetector;
vector<Marker> Markers;

this->TheCameraParameters.readFromXMLFile(CAMERA_PARAM_FILE);
this->TheCameraParameters.resize(frame.size());
MDetector.detect(frame,Markers, this->TheCameraParameters, MARKER_SIZE);

This code gives me a vector (Markers) that consists of different detected markers. If I print Markers out I get following:

24=(304.631,14.2414) (358.085,12.8291) (358.957,69.6651) (306.197,71.0909) Txyz=0.0540816 -0.892379 2.30182 Rxyz=-2.99629 0.0430742 -0.0213533

But now I want to get the pixel values of the marker. With Markers[0].id,Markers[0].Tvec,Markers[0].Rvec I can extract the id, translation and rotation matrix, but I cant find a way to get the pixel values. Can someone help me with this?

Drise
  • 4,310
  • 5
  • 41
  • 66
SVL
  • 7
  • 8
  • Gives you what? – Drise Feb 02 '18 at 19:19
  • Ow sorry that wasn't supposed to stand there – SVL Feb 02 '18 at 19:42
  • 1
    Also, as a future note, `Thank You`'s are typically frowned upon (or at least they were when I was a heavy editor) See also [this meta link](https://meta.stackoverflow.com/questions/267384/removing-someone-elses-thank-you) in regards to `Thank you`'s – Drise Feb 02 '18 at 19:46

1 Answers1

0

I found the answer after an intensive search in the library.

In following output

24=(304.631,14.2414) (358.085,12.8291) (358.957,69.6651) (306.197,71.0909) Txyz=0.0540816 -0.892379 2.30182 Rxyz=-2.99629 0.0430742 -0.0213533

The first element (24) is the id of the marker. The next 4 elements are the pixel coordinates of the 4 corners. With Markers[0][0].x and Markers[0][0].y you get the x- and y-coordinate of the top left corner.

SVL
  • 7
  • 8