2016.9.4 更新最新版本,修复崩溃bug 用户可以通过从手机相册选取一张图片,或者通过摄像头拍摄一张照片。 可以通过摄像头实时识别车牌 下一步工作 改进实时视频识别问题
有任何问题请发issues,或者联系我[email protected] :)
This is EasyPR iOS version.An open source project for chinese plate recognition. It aims to be Easy, Flexible, and Accurate. Welcome to contribute your expertise !
2016.9.4 更新最新版本,修复崩溃bug 用户可以通过从手机相册选取一张图片,或者通过摄像头拍摄一张照片。 可以通过摄像头实时识别车牌 下一步工作 改进实时视频识别问题
有任何问题请发issues,或者联系我[email protected] :)
OPENCV2.framework没有支持arm64
Undeclared selector TraningPressed
作者你好 我想问下 这个类库那些文件需要集成在项目里面 我这边集成的时候报错 下载了demo 我觉的最好是把需要的文件类放在一个文件夹里面
问一下这个是EasyPR 哪个版本的?我换成EasyPR 1.5的版本直接卡在plateLocate方法不动了。大神能更新么
我已经做了:
1.关闭enable bitcode
2.添加 lib CoreGraphics
3.添加header search path
4.将ViewController后缀改成了 mm
然后在我使用这个库的时候出现了编译错误:
Undefined symbols for architecture i386:
"easypr::CPlateDetect::~CPlateDetect()", referenced from:
easypr::CPlateRecognize::~CPlateRecognize() in ViewController.o
"easypr::CCharsRecognise::~CCharsRecognise()", referenced from:
easypr::CPlateRecognize::~CPlateRecognize() in ViewController.o
"easypr::CPlateRecognize::CPlateRecognize()", referenced from:
-[ViewController plateRecognition:] in ViewController.o
"easypr::CPlateRecognize::plateRecognize(cv::Mat, std::__1::vector<easypr::CPlate, std::__1::allocatoreasypr::CPlate >&, int)", referenced from:
-[ViewController plateRecognition:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
调用源代码是这样的:
`
using namespace easypr;
-(UIImage*)plateRecognition:(cv::Mat&)src {
UIImage *plateimage;
vector<CPlate> plateVec;
double t=cv::getTickCount();
CPlateRecognize pr;
int result = pr.plateRecognize(src, plateVec);
t=cv::getTickCount()-t;
NSLog(@"time %f",t*1000/cv::getTickFrequency());
if (result == 0) {
size_t num = plateVec.size();
for (size_t j = 0; j < num; j++) {
cout << "plateRecognize: " << plateVec[j].getPlateStr() << endl;
}
}
if (result != 0) cout << "result:" << result << endl;
if(plateVec.size()==0){
[self.cardNum performSelectorOnMainThread:@selector(setText:) withObject:[NSString stringWithFormat:@"No Plate"] waitUntilDone:NO];
return plateimage;
}
string name=plateVec[0].getPlateStr();
NSString *resultMessage = [NSString stringWithCString:plateVec[0].getPlateStr().c_str()
encoding:NSUTF8StringEncoding];
[self.cardNum performSelectorOnMainThread:@selector(setText:) withObject:[NSString stringWithFormat:@"%@",resultMessage] waitUntilDone:NO];
if (result != 0)
cout << "result:" << result << endl;
return plateimage;}`
-(void)start{
cout << "test_plate_recognize" << endl;
pr.setLifemode(true);
pr.setDebug(true);
pr.setMaxPlates(4);
// pr.setDetectType(PR_DETECT_COLOR | PR_DETECT_SOBEL);
pr.setDetectType(easypr::PR_DETECT_CMSER);
NSString *nsstring=[[NSBundle mainBundle] pathForResource:@"test" ofType:@"jpg"];
NSLog(@"%@",nsstring );
string image_path=[nsstring UTF8String];
source_image=imread(image_path);
resize(source_image, source_image,cv::Size(source_image.cols/2,source_image.rows/2));
[self plateRecognition:source_image];
}
-(id) initWithurl:(NSString *)imageurl
{
self = [super init] ;
if ( self ) {
self.imageurl=imageurl;
}
return self ;
}
-(UIImage*)plateRecognition:(cv::Mat&)src
{
UIImage plateimage;
vector plateVec;
double t=cv::getTickCount();
int result = pr.plateRecognize(src, plateVec); //此行以后程序停止但是不报任何错误。
t=cv::getTickCount()-t;
NSLog(@"time %f",t1000/cv::getTickFrequency());
if (result == 0) {
size_t num = plateVec.size();
for (size_t j = 0; j < num; j++) {
cout << "plateRecognize: " << plateVec[j].getPlateStr() << endl;
}
}
if (result != 0) cout << "result:" << result << endl;
if(plateVec.size()==0){
[SVProgressHUD dismiss];
return plateimage;
}
string name=plateVec[0].getPlateStr();
NSString *resultMessage = [NSString stringWithCString:plateVec[0].getPlateStr().c_str()
encoding:NSUTF8StringEncoding];
NSLog(@"%@",resultMessage);
if (result != 0)
cout << "result:" << result << endl;
[SVProgressHUD dismiss];
return plateimage;
}
根据我的调试,cvMat 的颜色值顺序貌似为BGR, 而不是 RGB;
所以目前源代码UIImageCVMatConverter.mm 中的+ (cv::Mat)cvMatFromUIImage:(UIImage *)image
与+(UIImage *)UIImageFromCVMat:(cv::Mat)cvMat 两个函数,都存在反色问题。
要调整其中cvtColor的调用参数。
是否代码不是最新呢, 我获取项目, 编译, 点击识别, 闪退.
之后,我再次编译, app闪退.
什么时候更新下一个版本????
有识别不了的图片,直接奔溃,在哪里可以判断一下,那个图片缩放怎么不是等比例
pod install opencv 后还是 编译不通过。
崩溃 原因 : Thread 57: EXC_BAD_ACCESS (code=1, address=0x11d364000)
崩溃 方法 : cvtColor(img, RGB, COLOR_BGRA2RGB)
崩溃描述 :会识别一次,第二次的时,就崩溃了。
iPhone5s拍了几张照识别之后就不断闪退了。。。,是照片格式问题吗?从网上下载的图片来识别却不会奔溃。
为什么安装最新系统的苹果手机进行真机测试使用的时候会报错?怎么解决?
集成的时候一直报错 求大神给个方案
集成后报错,文件找不到,好像是路径的问题,求修改路径的方法
测的工程自带的一些数据,有一些能够识别正确,但是有一个共同的问题,汉字普遍识别不对。有解决办法吗?
UIImageCVMatConverter 这个文件 还有core 这个文件夹一托到项目里面就报错,,大神啊,怎么解决?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.