罗成or房谋杜断
整个项目的结构图:编写,代码如下:[java] viewplaincopyprint?package ;import ;import ;import ;import ;import ;import ;import ;import ;//// Detects faces in an image, draws boxes around them, and writes the results// to "".//public class DetectFaceDemo {public void run() {("\nRunning DetectFaceDemo");(getClass().getResource("").getPath());// Create a face detector from the cascade file in the resources// directory.//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("").getPath());//Mat image = (getClass().getResource("").getPath());//注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误/** Detected 0 faces Writing libpng warning: Image* width is zero in IHDR libpng warning: Image height is zero in IHDR* libpng error: Invalid IHDR data*///因此,我们将第一个字符去掉String xmlfilePath=getClass().getResource("").getPath().substring(1);CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);Mat image = (getClass().getResource("").getPath().substring(1));// Detect faces in the image.// MatOfRect is a special container class for faceDetections = new MatOfRect();(image, faceDetections);(("Detected %s faces", ().length));// Draw a bounding box around each (Rect rect : ()) {(image, new Point(, ), new Point( + , + ), new Scalar(0, 255, 0));}// Save the visualized filename = "";(("Writing %s", filename));(filename, image);}}package ;import ;import ;import ;import ;import ;import ;import ;import ;//// Detects faces in an image, draws boxes around them, and writes the results// to "".//public class DetectFaceDemo {public void run() {("\nRunning DetectFaceDemo");(getClass().getResource("").getPath());// Create a face detector from the cascade file in the resources// directory.//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("").getPath());//Mat image = (getClass().getResource("").getPath());//注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误/** Detected 0 faces Writing libpng warning: Image* width is zero in IHDR libpng warning: Image height is zero in IHDR* libpng error: Invalid IHDR data*///因此,我们将第一个字符去掉String xmlfilePath=getClass().getResource("").getPath().substring(1);CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);Mat image = (getClass().getResource("").getPath().substring(1));// Detect faces in the image.// MatOfRect is a special container class for faceDetections = new MatOfRect();(image, faceDetections);(("Detected %s faces", ().length));// Draw a bounding box around each (Rect rect : ()) {(image, new Point(, ), new Point( + , + ), new Scalar(0, 255, 0));}// Save the visualized filename = "";(("Writing %s", filename));(filename, image);}}3.编写测试类:[java] viewplaincopyprint?package ;public class TestMain {public static void main(String[] args) {("Hello, OpenCV");// Load the native ("opencv_java246");new DetectFaceDemo().run();}}//运行结果://Hello, OpenCV////Running DetectFaceDemo///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/ 8 faces//Writing ;public class TestMain {public static void main(String[] args) {("Hello, OpenCV");// Load the native ("opencv_java246");new DetectFaceDemo().run();}}//运行结果://Hello, OpenCV////Running DetectFaceDemo///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/ 8 faces//Writing
你可以到七七计算机毕业论文的毕业设计题目列表中找一份。有完整的论文和源码等,很详细
人机博弈。要多难都可以。
本科生论文不会的,除非学校有什么大的活动,比如上级主管部门前来检查、评估。或者有人检举你。
有一个月没更博客了,捂脸 o( ̄= ̄)d 端午回家休息了几天,6月要加油~ 回到正文,HOG是很经典的一种图像特征提取方法,尤其是在行人识别领域被应用的很多。虽
深度嵌入聚类算法研究 基于机器视觉的行人重识别算法的分析与实现 基于动力学模型的属性网络重叠社团发现 基于Spr