From 4d3989817c9e4e3274723bfe97e49150b134e95b Mon Sep 17 00:00:00 2001 From: berak Date: Mon, 29 Jul 2019 10:49:42 +0200 Subject: [PATCH] java: fix Mat.toString() for higher dimensions --- modules/core/misc/java/src/java/core+Mat.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/core/misc/java/src/java/core+Mat.java b/modules/core/misc/java/src/java/core+Mat.java index c75f9d5c01..a666e86589 100644 --- a/modules/core/misc/java/src/java/core+Mat.java +++ b/modules/core/misc/java/src/java/core+Mat.java @@ -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