openCV

openCV

 

tesseract 文字辨識

httpsss://www.pyimagesearch.com/2017/07/03/installing-tesseract-for-ocr/

tesseract 中文辨識 建立字庫

httpss://www.itread01.com/articles/1476853517.html

tesseract  各國字庫
httpsss://github.com/tesseract-ocr/langdata/tree/master/chi_tra

99.7% 文字辨識方法 類神經網路
httpsss://www.tensorflow.org/versions/r1.0/get_started/mnist/beginners

Haar XML 手

httpsss://github.com/Balaje/OpenCV/tree/master/haarcascades

Haar Tranig

httpsss://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

httpsss://github.com/mrnugget/opencv-haar-classifier-training

httpsss://github.com/mrnugget/opencv-haar-classifier-training

 

汽車 和車流量

httpsss://github.com/andrewssobral/vehicle_detection_haarcascades

 

Video Save and  Lord

 

httpsss://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html

 

 

 

 

 

 

 

#include <cstdio>

#include <opencv2/opencv.hpp>

using namespace cv;

int main(){

VideoCapture video(“VideoTest.avi”);

if (!video.isOpened()){

return -1;

}

Size videoSize = Size((int)video.get(CV_CAP_PROP_FRAME_WIDTH),

(int)video.get(CV_CAP_PROP_FRAME_HEIGHT));

namedWindow(“video demo”, CV_WINDOW_AUTOSIZE);

Mat videoFrame;

while(true){

video >> videoFrame;

if( videoFrame.empty()){

break;

}

imshow(“video demo”, videoFrame);

waitKey(33);

}

return 0;

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#include <cstdio>

#include <opencv2/opencv.hpp>

using namespace cv;

int main(){

VideoCapture capture(0);

if(!capture.isOpened()){

return -1;

}

Size videoSize = Size((int)capture.get(CV_CAP_PROP_FRAME_WIDTH),

(int)capture.get(CV_CAP_PROP_FRAME_HEIGHT));

VideoWriter writer;

writer.open(“VideoTest.avi”, CV_FOURCC(‘M’, ‘J’, ‘P’, ‘G’), 30, videoSize);

namedWindow(“show image”,0);

while(true){

Mat frame;

capture >> frame;

if(!frame.empty()){

writer.write(frame);

imshow(“show image”, frame);

if(waitKey(33) == 27){

break;

}

}

}

return 0;

}