use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Photo method denoise_TVL1.
// javadoc: denoise_TVL1(observations, result)
public static void denoise_TVL1(List<Mat> observations, Mat result) {
Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
denoise_TVL1_1(observations_mat.nativeObj, result.nativeObj);
return;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Photo method fastNlMeansDenoisingMulti.
// javadoc: fastNlMeansDenoisingMulti(srcImgs, dst, imgToDenoiseIndex, temporalWindowSize)
public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize) {
Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs);
fastNlMeansDenoisingMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize);
return;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Converters method vector_int_to_Mat.
public static Mat vector_int_to_Mat(List<Integer> is) {
Mat res;
int count = (is != null) ? is.size() : 0;
if (count > 0) {
res = new Mat(count, 1, CvType.CV_32SC1);
int[] buff = new int[count];
for (int i = 0; i < count; i++) {
int v = is.get(i);
buff[i] = v;
}
res.put(0, 0, buff);
} else {
res = new Mat();
}
return res;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Converters method vector_uchar_to_Mat.
public static Mat vector_uchar_to_Mat(List<Byte> bs) {
Mat res;
int count = (bs != null) ? bs.size() : 0;
if (count > 0) {
res = new Mat(count, 1, CvType.CV_8UC1);
byte[] buff = new byte[count];
for (int i = 0; i < count; i++) {
byte b = bs.get(i);
buff[i] = b;
}
res.put(0, 0, buff);
} else {
res = new Mat();
}
return res;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Converters method Mat_to_vector_vector_DMatch.
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
if (lvdm == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
if (m == null)
throw new java.lang.IllegalArgumentException("Input Mat can't be null");
List<Mat> mats = new ArrayList<Mat>(m.rows());
Mat_to_vector_Mat(m, mats);
lvdm.clear();
for (Mat mi : mats) {
MatOfDMatch vdm = new MatOfDMatch(mi);
lvdm.add(vdm);
mi.release();
}
mats.clear();
}
Aggregations