no commit message

devA
yuxue 5 years ago
parent e750ea39dc
commit 643f9400b9

@ -11,14 +11,14 @@ import org.opencv.objdetect.CascadeClassifier;
* Detects faces in an image, draws boxes around them,
* and writes the results to "faceDetection.png".
*/
public class DetectFaceDemo {
public class FaceController {
static {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
public static void main(String[] args) {
DetectFaceDemo demo = new DetectFaceDemo();
FaceController demo = new FaceController();
demo.run();
}

@ -0,0 +1,49 @@
package com.yuxue.controller;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.Scalar;
/**
* opencv demo
* opencv
* windows
* 1openvphttps://opencv.org/releases/page/2/ 当前使用4.0.1版本
* 2exe \build\java\x64\opencv_java401.dll \build\x64\vc14\bin\
* 3eclipseUser Libraries
* 4build pathlib
*
* demoopencvdemo使maven
*
* @author yuxue
* @date 2020-04-22 14:04
*/
public class OpencvDemo {
static {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
public static void main(String[] args) {
System.out.println("Welcome to OpenCV " + Core.VERSION);
Mat m1 = Mat.eye(3, 3, CvType.CV_8UC1);
System.out.println("m = " + m1.dump());
System.err.println("==================");
Mat m = new Mat(5, 10, CvType.CV_8UC1, new Scalar(0));
System.out.println("OpenCV Mat: " + m);
Mat mr1 = m.row(1);
mr1.setTo(new Scalar(1));
Mat mc5 = m.col(5);
mc5.setTo(new Scalar(5));
System.out.println("OpenCV Mat data:\n" + m.dump());
}
}

@ -1,22 +0,0 @@
package com.yuxue.controller;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
/**
* opencv demo
* @author yuxue
* @date 2020-04-22 14:04
*/
public class OpenvpDemo {
public static void main(String[] args) {
System.out.println("Welcome to OpenCV " + Core.VERSION);
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat m = Mat.eye(3, 3, CvType.CV_8UC1);
System.out.println("m = " + m.dump());
}
}

@ -26,7 +26,7 @@ public class PlateController {
@Autowired
private PlateService service;
/**
* d:/PlateDetect
*

@ -1,31 +0,0 @@
package com.yuxue.controller;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.CvType;
import org.opencv.core.Scalar;
/**
* demo
* @author yuxue
* @date 2020-04-24 15:34
*/
public class SimpleSample {
static {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
public static void main(String[] args) {
System.out.println("Welcome to OpenCV " + Core.VERSION);
Mat m = new Mat(5, 10, CvType.CV_8UC1, new Scalar(0));
System.out.println("OpenCV Mat: " + m);
Mat mr1 = m.row(1);
mr1.setTo(new Scalar(1));
Mat mc5 = m.col(5);
mc5.setTo(new Scalar(5));
System.out.println("OpenCV Mat data:\n" + m.dump());
}
}
Loading…
Cancel
Save