Java API: fixing Core tests; minor enchantments in CvVector-s API

This commit is contained in:
Andrey Pavlenko
2012-04-04 14:26:43 +00:00
parent 5a93b275cd
commit 51338ec7c3
13 changed files with 101 additions and 52 deletions

View File

@@ -7,6 +7,10 @@ public class CvVectorByte extends CvVector {
super(_d, ch);
}
public CvVectorByte() {
super(_d, 1);
}
public CvVectorByte(int ch, long addr) {
super(_d, ch, addr);
}

View File

@@ -17,9 +17,9 @@ public class CvVectorDMatch extends CvVectorFloat {
super(_ch, m);
}
public CvVectorDMatch(DMatch[] a) {
public CvVectorDMatch(DMatch...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -7,6 +7,10 @@ public class CvVectorDouble extends CvVector {
super(_d, ch);
}
public CvVectorDouble() {
super(_d, 1);
}
public CvVectorDouble(int ch, long addr) {
super(_d, ch, addr);
}

View File

@@ -7,6 +7,10 @@ public class CvVectorFloat extends CvVector {
super(_d, ch);
}
public CvVectorFloat() {
super(_d, 1);
}
public CvVectorFloat(int ch, long addr) {
super(_d, ch, addr);
}

View File

@@ -8,6 +8,10 @@ public class CvVectorInt extends CvVector {
super(_d, ch);
}
public CvVectorInt() {
super(_d, 1);
}
public CvVectorInt(int ch, long addr) {
super(_d, ch, addr);
}

View File

@@ -17,9 +17,9 @@ public class CvVectorKeyPoint extends CvVectorFloat {
super(_ch, m);
}
public CvVectorKeyPoint(KeyPoint[] a) {
public CvVectorKeyPoint(KeyPoint...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -15,9 +15,9 @@ public class CvVectorPoint extends CvVectorInt {
super(_ch, m);
}
public CvVectorPoint(Point[] a) {
public CvVectorPoint(Point...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -15,9 +15,9 @@ public class CvVectorPoint2f extends CvVectorFloat {
super(_ch, m);
}
public CvVectorPoint2f(Point[] a) {
public CvVectorPoint2f(Point...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -15,9 +15,9 @@ public class CvVectorPoint3 extends CvVectorInt {
super(_ch, m);
}
public CvVectorPoint3(Point3[] a) {
public CvVectorPoint3(Point3...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -15,9 +15,9 @@ public class CvVectorPoint3f extends CvVectorFloat {
super(_ch, m);
}
public CvVectorPoint3f(Point3[] a) {
public CvVectorPoint3f(Point3...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);

View File

@@ -16,9 +16,9 @@ public class CvVectorRect extends CvVectorInt {
super(_ch, m);
}
public CvVectorRect(Rect[] a) {
public CvVectorRect(Rect...a) {
super(_ch);
if(a==null)
if(a==null || a.length==0)
return;
int cnt = a.length;
create(cnt);