ARUCO Marker Examples and Unity

OK, I’ve taken a closer look at this and there’s a bug in the ZEDToOpenCVRetriever.cs file. This could never work the way it is.

On line 217 the current line reads:

MatUtils.copyFromMat(buffermat, zedmat.GetPtr());

This should be replaced by the following line:

MatUtils.copyToMat(zedmat.GetPtr(), buffermat);

There’s a commented out line above this in the code, so it looks like the function call was changed but then nobody actually checked to see if it worked! The code as it is, is trying to move the data contents of buffermat to zedmat but in fact it should be the other way around. Therefore, the video image is not transferred and the OpenCV calls don’t detect any markers as a result.

Regards,
Dave