導航:首頁 > 編程語言 > 車牌識別紋理特徵代碼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相關的資料

熱點內容
celluloid教程 瀏覽:210
大話西遊2在線看免費 瀏覽:10
什麼看電視沒有水印 瀏覽:538
手機通訊錄與qq好友 瀏覽:236
牛客網java輸入輸出 瀏覽:370
什麼app要qq登錄 瀏覽:534
oracle資料庫如何執行 瀏覽:80
有趣的家庭的網站有哪些 瀏覽:148
域名升級訪問通知 瀏覽:270
片名《鬼作秀之頭顱鬼屋》 瀏覽:936
電腦系統host文件 瀏覽:996
求一個在線播放的網站 瀏覽:596
四級丶四級電影﹥ 瀏覽:582
怎麼把cad的工具欄調出來 瀏覽:742
強奸了女僵屍的電影 瀏覽:15
能在線觀看最新網址 瀏覽:317
3d電影下載網站3d電影 瀏覽:261
華為手機如何把app弄成小窗口 瀏覽:589
flash的工具欄 瀏覽:106
古風sq片 瀏覽:705

友情鏈接