• 大小: 32.31MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-28
  • 语言: 其他
  • 标签: opencv  手写识别  

资源简介

基于Opencv3.0 手写数字识别Demo

资源截图

代码片段和文件信息

//
//
//
///**
// 这个类用来生成样本数据
// **/
//
//#include “NumberRec.hpp“
//#define window_name “window“
//#define window_name_dst “window_dst“
//#define window_name_th “window_th“
//#define location_save “/Users/wangzy/study/opencv_300/my_data/%ld.png“//保存样本到指定的位置
//
//
//int pen_width =10;
//int line_type =3;
//
//int window_width=128;
//int window_height=128;
//
//
//void on_MouseHandle(int eventint xint yint flagsvoid* param);
//
//
//bool g_bDrawingBox=false;
//RNG g_rng(12345);
//
//
//
//int main(int argc const char * argv[]) {
//    
//    
//    
//    
//    
//    Mat srcImage(window_widthwindow_heightCV_8UC1)tempImage;
//    
//    srcImage.copyTo(tempImage);
//    
//    namedWindow(window_name);
//    
//    setMouseCallback(window_name on_MouseHandle(void*)&srcImage);
//    
//  
//    cout<<“要运行效果的话,请注视掉这个类文件的Main方法,然后打开Demo.cpp的注视“<//    cout<<“按C清除画板:“<//    cout<<“按S键保存并清除手写结果:“<//    
//    
//    while(1){
//        
//        
//        
//        
//        srcImage.copyTo(tempImage);
//        
//        imshow(window_name tempImage);
//        
//        char key= waitKey();
//        switch (key) {
//                
//            case ‘c‘:
//                srcImage=Scalar::all(0);
//                break;
////            case ‘+‘:
////                pen_width+=5;
////                break;
////                
////            case ‘-‘:
////                pen_width-=5;
////                if(pen_width<5){
////                    pen_width=5;
////                }
////                break;
//            case ‘s‘:
//                
//                char saved_name[100];
//                
//                
//                sprintf(saved_name location_save Tool::getTimeLabel());
//                
//                vector> contours;
//                
//                srcImage.copyTo(tempImage);
//                
//                
//                // find
//                findContours(tempImagecontoursCV_RETR_CCOMPCV_CHAIN_APPROX_NONE);
//                
//                Rect rect;
//                
//                
//                for(size_t i=0;i!=contours.size();++i){
//                    
//                    Rect  tempRect=boundingRect(contours[i]);
//                    //find max rect
//                    if(tempRect.width>rect.width && tempRect.height>rect.height){
//                        rect=tempRect;
//                    }
//                    
//                }
//                
//                if(rect.width==0){
//                    
//                    cout<<“请先写数字再按‘S’按键报错“<//                    continue;
//                }
//                
//                
//                Mat resultCenter=  Mat(window_widthwindow_heightCV_8UC1);
//                resultCenter=Scalar::all(0);
//                
//                Mat tempArea;
//                
//                srcImage(rect).copyTo(tempArea);
//                
//

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-02 14:12  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\
     文件        6148  2016-10-02 14:12  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\.DS_Store
     目录           0  2016-10-02 14:14  __MACOSX\
     目录           0  2016-10-02 14:14  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\
     文件         120  2016-10-02 14:12  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\._.DS_Store
     文件      232269  2016-10-02 14:09  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\doc.docx
     文件         120  2016-10-02 14:09  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\._doc.docx
     目录           0  2016-10-02 14:12  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\
     文件        6148  2016-10-02 14:12  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\.DS_Store
     目录           0  2016-10-02 14:14  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\
     文件         120  2016-10-02 14:12  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\._.DS_Store
     文件    23873512  2016-08-18 02:33  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\Install OpenCV 3.0.0 in Mac OS X Yosemite _ El Capitan.mp4
     文件        1196  2016-08-18 02:33  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\._Install OpenCV 3.0.0 in Mac OS X Yosemite _ El Capitan.mp4
     文件     9869623  2016-08-20 22:00  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\OpenCV 3.0.0 with Xcode.mp4
     文件        1055  2016-08-20 22:00  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\opencv3.0_mac_xcode瀹夎鏁欑▼\._OpenCV 3.0.0 with Xcode.mp4
     目录           0  2016-10-02 14:04  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\
     文件        6148  2016-10-02 14:04  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\.DS_Store
     目录           0  2016-10-02 14:14  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\
     文件         120  2016-10-02 14:04  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\._.DS_Store
     目录           0  2016-10-02 14:03  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\
     文件        6148  2016-10-02 14:03  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.DS_Store
     目录           0  2016-10-02 14:14  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\
     文件         120  2016-10-02 14:03  __MACOSX\Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\._.DS_Store
     目录           0  2016-10-02 14:03  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\
     文件          15  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\COMMIT_EDITMSG
     文件         144  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\config
     文件          73  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\description
     文件          23  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\HEAD
     目录           0  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\hooks\
     文件         177  2016-09-17 16:59  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\hooks\README.sample
     文件        1277  2016-10-02 13:51  Opencv3.0鎵嬪啓鏁板瓧璇嗗埆瀹屾暣鐗堟湰\Xcode宸ョ▼婧愮爜\OpencvDemoNew\.git\index
............此处省略353个文件信息

评论

共有 条评论