导航:首页 > 编程语言 > 车牌识别纹理特征代码opencv3

车牌识别纹理特征代码opencv3

发布时间:2022-01-19 17:55:27

① 基于opencv的车牌识别完整程序,求方案和程序

大二做过的项目~现在在搞车辆检测和跟踪

② 基于opencv的车牌识别完整程序,为了这个课题已经头疼了快一个月了 ,大侠能不能帮帮忙。

整个项目的结构图:

编写mo.java,代码如下:

[java] view
plainprint?

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
plainprint?

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的车牌识别完整程序

还是用FindWindow函数,
利用它的第一个参数lpClassName,
他应该不会变的,lpClassName可以通过SPY++找到

希望我的回答对你有所帮助
如有其他问题,可以继续追问,您的采纳是我前进的动力!

④ 求OpenCV物体特征识别代码

网络积分好像没啥用吧?
你把图片贴出来,也许能帮你提提建议

⑤ 基于OpenCV的完整的车牌识别代码加论文

基于OpenCV的完整的车牌识别代码加
我知道的内容,肯定还好

⑥ 基于linux下opencv的车牌识别完整程序,求完整源码,有论文更佳,着急有用,求各路大神帮忙!!

从行动上描写出武松谋略的机智和武艺的高强。
在描写人物行动的时候,应该注意人物行动
的生动性和典型性。所谓生动性,指的是作者不仅要写出人物在做什么,而且要写出他怎样做

⑦ OPenCV特征检测代码。。

#include "cv.h"
#include "highgui.h"

int main( int argc, char** argv )
{
IplImage* pImg; //声明IplImage指针

//载入图像
if( argc == 2 &&
(pImg = cvLoadImage( argv[1], 1)) != 0 )
{
cvNamedWindow( "Image", 1 );//创建窗口
cvShowImage( "Image", pImg );//显示图像

cvWaitKey(0); //等待按键

cvDestroyWindow( "Image" );//销毁窗口
cvReleaseImage( &pImg ); //释放图像
return 0;
}

return -1;
}

⑧ 做基于OPencv的车牌识别,需要车牌字符模板特征值,用十五个数字来代替汉字或字符的那种,例子问题补充里

这个数字特征可以自己算
用不同方向,不同阶的 矩 组成

⑨ 谁有用opencv做的车牌识别代码,可以实现拍照,定位,识别的 谢谢。 八六九三八一五九四@qq.com

如果能这么容易搞到手,企业不是该倒闭了。

阅读全文

与车牌识别纹理特征代码opencv3相关的资料

热点内容
军婚肉肉的小说 浏览:298
韩国电影卖保险的女人 浏览:432
飞猫云下载的文件在哪里看 浏览:271
qq上的赞是真的赞了吗 浏览:511
火山岛电影女演员 浏览:858
永恒在线观百度云 浏览:199
学而思编程哪个版本好 浏览:208
免费观影网站 知乎 浏览:813
美人电影韩国结局 浏览:459
kindle下载pdf文件 浏览:213
妻子交换txt 浏览:638
电脑找不到网络怎么办 浏览:136
欧美电影有中英文字幕 浏览:760
宅男在线影院 浏览:847
怎么看日本上映电影 浏览:190
朋友分享的app有哪些 浏览:770
贪婪的朋友女友演员 浏览:420
男主角与国外母亲 浏览:502
葵花宝典台湾 浏览:602
法国啄木鸟官网app 浏览:7

友情链接