×

opencv下载页官网

opencv下载页官网(求一个opencv 2.4.2,找不到可下载的地址)

admin admin 发表于2023-03-21 09:52:45 浏览35 评论0

抢沙发发表评论

本文目录

求一个opencv 2.4.2,找不到可下载的地址


整个项目的结构图:
编写DetectFaceDemo.java,代码如下:
[java] view
plaincopyprint?
package com.njupt.zhb.test;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.highgui.Highgui;
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 void run() {
System.out.println(“\nRunning DetectFaceDemo“);
System.out.println(getClass().getResource(“lbpcascade_frontalface.xml“).getPath());
// Create a face detector from the cascade file in the resources
// directory.
//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource(“lbpcascade_frontalface.xml“).getPath());
//Mat image = Highgui.imread(getClass().getResource(“lena.png“).getPath());
//注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误
/*
* Detected 0 faces Writing faceDetection.png 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(“lbpcascade_frontalface.xml“).getPath().substring(1);
CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);
Mat image = Highgui.imread(getClass().getResource(“we.jpg“).getPath().substring(1));
// Detect faces in the image.
// MatOfRect is a special container class for Rect.
MatOfRect faceDetections = new MatOfRect();
faceDetector.detectMultiScale(image, faceDetections);
System.out.println(String.format(“Detected %s faces“, faceDetections.toArray().length));
// Draw a bounding box around each face.
for (Rect rect : faceDetections.toArray()) {
Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
}
// Save the visualized detection.
String filename = “faceDetection.png“;
System.out.println(String.format(“Writing %s“, filename));
Highgui.imwrite(filename, image);
}
}
package com.njupt.zhb.test;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.highgui.Highgui;
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 void run() {
System.out.println(“\nRunning DetectFaceDemo“);
System.out.println(getClass().getResource(“lbpcascade_frontalface.xml“).getPath());
// Create a face detector from the cascade file in the resources
// directory.
//CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource(“lbpcascade_frontalface.xml“).getPath());
//Mat image = Highgui.imread(getClass().getResource(“lena.png“).getPath());
//注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误
/*
* Detected 0 faces Writing faceDetection.png 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(“lbpcascade_frontalface.xml“).getPath().substring(1);
CascadeClassifier faceDetector = new CascadeClassifier(xmlfilePath);
Mat image = Highgui.imread(getClass().getResource(“we.jpg“).getPath().substring(1));
// Detect faces in the image.
// MatOfRect is a special container class for Rect.
MatOfRect faceDetections = new MatOfRect();
faceDetector.detectMultiScale(image, faceDetections);
System.out.println(String.format(“Detected %s faces“, faceDetections.toArray().length));
// Draw a bounding box around each face.
for (Rect rect : faceDetections.toArray()) {
Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0, 255, 0));
}
// Save the visualized detection.
String filename = “faceDetection.png“;
System.out.println(String.format(“Writing %s“, filename));
Highgui.imwrite(filename, image);
}
}
3.编写测试类:
[java] view
plaincopyprint?
package com.njupt.zhb.test;
public class TestMain {
public static void main(String args) {
System.out.println(“Hello, OpenCV“);
// Load the native library.
System.loadLibrary(“opencv_java246“);
new DetectFaceDemo().run();
}
}
//运行结果:
//Hello, OpenCV
//
//Running DetectFaceDemo
///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml
//Detected 8 faces
//Writing faceDetection.png
package com.njupt.zhb.test;
public class TestMain {
public static void main(String args) {
System.out.println(“Hello, OpenCV“);
// Load the native library.
System.loadLibrary(“opencv_java246“);
new DetectFaceDemo().run();
}
}
//运行结果:
//Hello, OpenCV
//
//Running DetectFaceDemo
///E:/eclipse_Jee/workspace/JavaOpenCV246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml
//Detected 8 faces
//Writing faceDetection.png

请问opencv是什么


OpenCV是一个用于图像处理、分析、机器视觉方面的开源函数库.
无论你是做科学研究,还是商业应用,opencv都可以作为你理想的工具库,因为,对于这两者,它完全是免费的。
该库采用C及C++语言编写,可以在windows, linux, mac OSX系统上面运行。该库的所有代码都经过优化,计算效率很高,因为,它更专注于设计成为一种用于实时系统的开源库。opencv采用C语言进行优化,而且,在多核机器上面,其运行速度会更快。它的一个目标是提供友好的机器视觉接口函数,从而使得复杂的机器视觉产品可以加速面世。该库包含了横跨工业产品检测、医学图像处理、安防、用户界面、摄像头标定、三维成像、机器视觉等领域的超过500个接口函数。
同时,由于计算机视觉与机器学习密不可分,该库也包含了比较常用的一些机器学习算法。或许,很多人知道,图像识别、机器视觉在安防领域有所应用。但,很少有人知道,在航拍图片、街道图片(例如google street view)中,要严重依赖于机器视觉的摄像头标定、图像融合等技术。
近年来,在入侵检测、特定目标跟踪、目标检测、人脸检测、人脸识别、人脸跟踪等领域,opencv可谓大显身手,而这些,仅仅是其应用的冰山一角。
如今,来自世界各地的各大公司、科研机构的研究人员,共同维护支持着opencv的开源库开发。这些公司和机构包括:微软,IBM,索尼、西门子、google、intel、斯坦福、MIT、CMU、剑桥。。。。

opencv 是 Intel 的图像处理库,实现 图像的基本处理 ,如 膨胀,二值化处理,如果要学习,可以到《a href=“
一些基本的资料可以参考:
=》源代码及文档下载:SOURCEFORGE.NET
《a href=“http://sourceforge.net/projects/opencvlibrary/“》http://sourceforge.net/projects/opencvlibrary/《/a》
=》INTEL的OPENCV主页:
《a href=“http://www.intel.com/research/mrl/research/opencv/“》http://www.intel.com/research/mrl/research/opencv/《/a》
=》YAHOO OPENCV 的邮件列表:
《a href=“http://groups.yahoo.com/group/OpenCV/“》http://groups.yahoo.com/group/OpenCV/《/a》
=》CMU(卡耐基-梅隆大学)的计算机视觉主页:
《a href=“http://www-2.cs.cmu.edu/afs/cs/project/cil/ftp/html/vision.html“》http://www-2.cs.cmu.edu/afs/cs/project/cil/ftp/html/vision.html《/a》
=》OPENCV 更为详细的介绍
《a href=“http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/index.htm“》http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/index.htm《/a》
=》OPENCV 的常用问题与解答
《a href=“http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/faq.htm“》http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/faq.htm《/a》
=》OPENCV 的安装指南
《a href=“http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/install“》http://www.assuredigit.com//incoming/sourcecode/opencv/chinese_docs/install《/a》
=》更多的最新资料,请访问
《a href=“http://blog.csdn.net/hunnish“》http://blog.csdn.net/hunnish《/a》


windows10中怎么安装opencv


 1,我的环境:
  操作系统:Windows 10 64位
  IDE: Visual studio Community 2015(此版本免费,基本功能都有,够用)
  OpenCV: OpenCV 3.0 for windows(下载地址:由于我也是新手,所以网上随手找个一个项目:
cpp] view plain copy print?
//显示图像文件
#include 《opencv2/opencv.hpp》
using namespace std;
#pragma comment(linker, “/subsystem:\“windows\“ /entry:\“mainCRTStartup\““)
int main()
{
const char *pstrImageName = “IMG_0897.JPG“;
const char *pstrWindowsTitle = “OpenCV第一个程序“;
//从文件中读取图像
IplImage *pImage = cvLoadImage(pstrImageName, CV_LOAD_IMAGE_UNCHANGED);
//创建窗口
cvNamedWindow(pstrWindowsTitle, CV_WINDOW_AUTOSIZE);
//在指定窗口中显示图像
cvShowImage(pstrWindowsTitle, pImage);
//等待按键事件
cvWaitKey();
cvDestroyWindow(pstrWindowsTitle);
cvReleaseImage(&pImage);
return 0;
}

opencv2.4.4版本下载,学习急需用到


http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.4/OpenCV-2.4.4.exe/download
这个是官网的链接,我这边是可以下载的,你先试试,不行再回复我,我上传个给你