fixing empty Mat case
authorAndrey Pavlenko <andrey.pavlenko@itseez.com>
Sat, 8 Jun 2013 08:41:57 +0000 (12:41 +0400)
committerAndrey Pavlenko <andrey.pavlenko@itseez.com>
Sat, 8 Jun 2013 08:41:57 +0000 (12:41 +0400)
13 files changed:
modules/java/generator/src/java/core+MatOfByte.java
modules/java/generator/src/java/core+MatOfDouble.java
modules/java/generator/src/java/core+MatOfFloat.java
modules/java/generator/src/java/core+MatOfFloat4.java
modules/java/generator/src/java/core+MatOfFloat6.java
modules/java/generator/src/java/core+MatOfInt.java
modules/java/generator/src/java/core+MatOfInt4.java
modules/java/generator/src/java/core+MatOfKeyPoint.java
modules/java/generator/src/java/core+MatOfPoint.java
modules/java/generator/src/java/core+MatOfPoint2f.java
modules/java/generator/src/java/core+MatOfPoint3.java
modules/java/generator/src/java/core+MatOfPoint3f.java
modules/java/generator/src/java/core+MatOfRect.java

index 0ebdb66..b3fe569 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfByte extends Mat {
 
     protected MatOfByte(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfByte extends Mat {
 
     public MatOfByte(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index cca5251..4eb7cbc 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfDouble extends Mat {
 
     protected MatOfDouble(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfDouble extends Mat {
 
     public MatOfDouble(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index ce73b6f..96bbeab 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfFloat extends Mat {
 
     protected MatOfFloat(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfFloat extends Mat {
 
     public MatOfFloat(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 8a3e510..aaa97b7 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfFloat4 extends Mat {
 
     protected MatOfFloat4(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfFloat4 extends Mat {
 
     public MatOfFloat4(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 1e23101..68e6249 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfFloat6 extends Mat {
 
     protected MatOfFloat6(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfFloat6 extends Mat {
 
     public MatOfFloat6(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 80c5b3a..33e5124 100644 (file)
@@ -15,7 +15,7 @@ public class MatOfInt extends Mat {
 
     protected MatOfInt(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -26,7 +26,7 @@ public class MatOfInt extends Mat {
 
     public MatOfInt(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 6027710..c924233 100644 (file)
@@ -15,7 +15,7 @@ public class MatOfInt4 extends Mat {
 
     protected MatOfInt4(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -26,7 +26,7 @@ public class MatOfInt4 extends Mat {
 
     public MatOfInt4(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index b91fedc..b402fe1 100644 (file)
@@ -16,7 +16,7 @@ public class MatOfKeyPoint extends Mat {
 
     protected MatOfKeyPoint(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -27,7 +27,7 @@ public class MatOfKeyPoint extends Mat {
 
     public MatOfKeyPoint(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 23eeed0..6d23ed1 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfPoint extends Mat {
 
     protected MatOfPoint(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfPoint extends Mat {
 
     public MatOfPoint(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index ba4be4a..0c69607 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfPoint2f extends Mat {
 
     protected MatOfPoint2f(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfPoint2f extends Mat {
 
     public MatOfPoint2f(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 16e2130..0c8374f 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfPoint3 extends Mat {
 
     protected MatOfPoint3(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfPoint3 extends Mat {
 
     public MatOfPoint3(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 97e2a95..b0d50d4 100644 (file)
@@ -14,7 +14,7 @@ public class MatOfPoint3f extends Mat {
 
     protected MatOfPoint3f(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -25,7 +25,7 @@ public class MatOfPoint3f extends Mat {
 
     public MatOfPoint3f(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
index 2e58bfe..3844d9d 100644 (file)
@@ -15,7 +15,7 @@ public class MatOfRect extends Mat {
 
     protected MatOfRect(long addr) {
         super(addr);
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }
@@ -26,7 +26,7 @@ public class MatOfRect extends Mat {
 
     public MatOfRect(Mat m) {
         super(m, Range.all());
-        if(checkVector(_channels, _depth) < 0 )
+        if( !empty() && checkVector(_channels, _depth) < 0 )
             throw new IllegalArgumentException("Incomatible Mat");
         //FIXME: do we need release() here?
     }