|
|
|
@ -957,12 +957,25 @@ public class Mat { |
|
|
|
|
|
|
|
|
|
//javadoc:Mat::put(row,col,data)
|
|
|
|
|
public int put(int row, int col, double...data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
return nPutD(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//javadoc:Mat::put(row,col,data)
|
|
|
|
|
public int put(int row, int col, float[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_32F) { |
|
|
|
|
return nPutF(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -972,6 +985,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::put(row,col,data)
|
|
|
|
|
public int put(int row, int col, int[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_32S) { |
|
|
|
|
return nPutI(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -981,6 +1000,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::put(row,col,data)
|
|
|
|
|
public int put(int row, int col, short[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) { |
|
|
|
|
return nPutS(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -990,6 +1015,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::put(row,col,data)
|
|
|
|
|
public int put(int row, int col, byte[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) { |
|
|
|
|
return nPutB(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -999,6 +1030,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::get(row,col,data)
|
|
|
|
|
public int get(int row, int col, byte[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_8U || CvType.depth(t) == CvType.CV_8S) { |
|
|
|
|
return nGetB(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -1008,6 +1045,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::get(row,col,data)
|
|
|
|
|
public int get(int row, int col, short[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_16U || CvType.depth(t) == CvType.CV_16S) { |
|
|
|
|
return nGetS(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -1017,6 +1060,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::get(row,col,data)
|
|
|
|
|
public int get(int row, int col, int[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_32S) { |
|
|
|
|
return nGetI(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -1026,6 +1075,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::get(row,col,data)
|
|
|
|
|
public int get(int row, int col, float[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_32F) { |
|
|
|
|
return nGetF(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
@ -1035,6 +1090,12 @@ public class Mat { |
|
|
|
|
//javadoc:Mat::get(row,col,data)
|
|
|
|
|
public int get(int row, int col, double[] data) { |
|
|
|
|
int t = type(); |
|
|
|
|
if(data == null || data.length % CvType.channels(t) != 0) |
|
|
|
|
throw new java.lang.UnsupportedOperationException( |
|
|
|
|
"Provided data element number (" + |
|
|
|
|
(data == null ? 0 : data.length) + |
|
|
|
|
") should be multiple of the Mat channels count (" + |
|
|
|
|
CvType.channels(t) + ")"); |
|
|
|
|
if(CvType.depth(t) == CvType.CV_64F) { |
|
|
|
|
return nGetD(nativeObj, row, col, data.length, data); |
|
|
|
|
} |
|
|
|
|