Commit 4d398981 authored by berak's avatar berak

java: fix Mat.toString() for higher dimensions

parent 5fd47352
......@@ -954,8 +954,11 @@ public class Mat {
// javadoc:Mat::toString()
@Override
public String toString() {
return "Mat [ " +
rows() + "*" + cols() + "*" + CvType.typeToString(type()) +
String _dims = (dims() > 0) ? "" : "-1*-1*";
for (int i=0; i<dims(); i++) {
_dims += size(i) + "*";
}
return "Mat [ " + _dims + CvType.typeToString(type()) +
", isCont=" + isContinuous() + ", isSubmat=" + isSubmatrix() +
", nativeObj=0x" + Long.toHexString(nativeObj) +
", dataAddr=0x" + Long.toHexString(dataAddr()) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment