Merge pull request #965 from apavlenko:fix_java_empty_mats
This commit is contained in:
commit
3016986833
@ -14,7 +14,7 @@ public class MatOfByte extends Mat {
|
|||||||
|
|
||||||
protected MatOfByte(long addr) {
|
protected MatOfByte(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfByte extends Mat {
|
|||||||
|
|
||||||
public MatOfByte(Mat m) {
|
public MatOfByte(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfDouble extends Mat {
|
|||||||
|
|
||||||
protected MatOfDouble(long addr) {
|
protected MatOfDouble(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfDouble extends Mat {
|
|||||||
|
|
||||||
public MatOfDouble(Mat m) {
|
public MatOfDouble(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfFloat extends Mat {
|
|||||||
|
|
||||||
protected MatOfFloat(long addr) {
|
protected MatOfFloat(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfFloat extends Mat {
|
|||||||
|
|
||||||
public MatOfFloat(Mat m) {
|
public MatOfFloat(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfFloat4 extends Mat {
|
|||||||
|
|
||||||
protected MatOfFloat4(long addr) {
|
protected MatOfFloat4(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfFloat4 extends Mat {
|
|||||||
|
|
||||||
public MatOfFloat4(Mat m) {
|
public MatOfFloat4(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfFloat6 extends Mat {
|
|||||||
|
|
||||||
protected MatOfFloat6(long addr) {
|
protected MatOfFloat6(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfFloat6 extends Mat {
|
|||||||
|
|
||||||
public MatOfFloat6(Mat m) {
|
public MatOfFloat6(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ public class MatOfInt extends Mat {
|
|||||||
|
|
||||||
protected MatOfInt(long addr) {
|
protected MatOfInt(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ public class MatOfInt extends Mat {
|
|||||||
|
|
||||||
public MatOfInt(Mat m) {
|
public MatOfInt(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ public class MatOfInt4 extends Mat {
|
|||||||
|
|
||||||
protected MatOfInt4(long addr) {
|
protected MatOfInt4(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ public class MatOfInt4 extends Mat {
|
|||||||
|
|
||||||
public MatOfInt4(Mat m) {
|
public MatOfInt4(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class MatOfKeyPoint extends Mat {
|
|||||||
|
|
||||||
protected MatOfKeyPoint(long addr) {
|
protected MatOfKeyPoint(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ public class MatOfKeyPoint extends Mat {
|
|||||||
|
|
||||||
public MatOfKeyPoint(Mat m) {
|
public MatOfKeyPoint(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfPoint extends Mat {
|
|||||||
|
|
||||||
protected MatOfPoint(long addr) {
|
protected MatOfPoint(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfPoint extends Mat {
|
|||||||
|
|
||||||
public MatOfPoint(Mat m) {
|
public MatOfPoint(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfPoint2f extends Mat {
|
|||||||
|
|
||||||
protected MatOfPoint2f(long addr) {
|
protected MatOfPoint2f(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfPoint2f extends Mat {
|
|||||||
|
|
||||||
public MatOfPoint2f(Mat m) {
|
public MatOfPoint2f(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfPoint3 extends Mat {
|
|||||||
|
|
||||||
protected MatOfPoint3(long addr) {
|
protected MatOfPoint3(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfPoint3 extends Mat {
|
|||||||
|
|
||||||
public MatOfPoint3(Mat m) {
|
public MatOfPoint3(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class MatOfPoint3f extends Mat {
|
|||||||
|
|
||||||
protected MatOfPoint3f(long addr) {
|
protected MatOfPoint3f(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ public class MatOfPoint3f extends Mat {
|
|||||||
|
|
||||||
public MatOfPoint3f(Mat m) {
|
public MatOfPoint3f(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ public class MatOfRect extends Mat {
|
|||||||
|
|
||||||
protected MatOfRect(long addr) {
|
protected MatOfRect(long addr) {
|
||||||
super(addr);
|
super(addr);
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ public class MatOfRect extends Mat {
|
|||||||
|
|
||||||
public MatOfRect(Mat m) {
|
public MatOfRect(Mat m) {
|
||||||
super(m, Range.all());
|
super(m, Range.all());
|
||||||
if(checkVector(_channels, _depth) < 0 )
|
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||||
throw new IllegalArgumentException("Incomatible Mat");
|
throw new IllegalArgumentException("Incomatible Mat");
|
||||||
//FIXME: do we need release() here?
|
//FIXME: do we need release() here?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user