Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS中扫描条形码(代码39格式)的免费SDK_Ios_Barcode_Scanning - Fatal编程技术网

iOS中扫描条形码(代码39格式)的免费SDK

iOS中扫描条形码(代码39格式)的免费SDK,ios,barcode,scanning,Ios,Barcode,Scanning,我想用iphone/ipad的摄像头扫描一个代码39格式的VIN条形码。我试过zxing和zbar,但效果不好。大多数情况下,他们无法识别条形码。有谁能告诉我更好的方法吗?或者我可以做些什么来增加结果,因为我只需要扫描代码39(对于VIN汽车)。使用Zbar来完成此操作。 为了获得足够的分辨率进行扫描,您需要以横向模式扫描条形码。以下是我的设置(已测试并正常工作) 那应该差不多够了!祝你好运 编辑/注意:从iOS 7开始,iOS框架现在包括条形码扫描仪。我以前使用Zbar比使用Zbar更容易获得

我想用iphone/ipad的摄像头扫描一个代码39格式的VIN条形码。我试过zxing和zbar,但效果不好。大多数情况下,他们无法识别条形码。有谁能告诉我更好的方法吗?或者我可以做些什么来增加结果,因为我只需要扫描代码39(对于VIN汽车)。

使用Zbar来完成此操作。 为了获得足够的分辨率进行扫描,您需要以横向模式扫描条形码。以下是我的设置(已测试并正常工作)

那应该差不多够了!祝你好运


编辑/注意:从iOS 7开始,iOS框架现在包括条形码扫描仪。我以前使用Zbar比使用Zbar更容易获得更好的结果。

我的回答解决了你的问题吗?嗨,我使用相同的代码,但对我来说不起作用,你能帮我吗?你能不能链接到你的代码,描述你使用的xcode版本,设备,zbar的版本呢?我想在黑暗中试一试,假设你在ios上使用了错误的zbar版本。如果您使用的是ios,请使用此版本:@Ravan如果nerdvision不起作用,您也可以使用此版本:(我还为iphone 5、sim卡等构建了此版本。在一些扫描后,我遇到了内存增加超过100Mb的问题。不起作用,请帮助我。@M.Y.谢谢您的评论,我相应地更新了文件。
// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;

ZBarImageScanner *scanner = reader.scanner;

//disable other codes to improve performance
[scanner setSymbology: 0
               config: ZBAR_CFG_ENABLE
                   to: 0];
[scanner setSymbology:ZBAR_CODE39 config:ZBAR_CFG_ENABLE to:1];
//only scan vertically, in the middle of the screen (also improves performance)
[reader setScanCrop:CGRectMake(0, 0.4, 1, 0.2)];
[reader setShowsZBarControls:NO];
[reader setShowsHelpOnFail:NO];
//VERY IMPORTANT: reset zoom. by default, the screen is partially zoomed in and will cause a loss of precision
reader.readerView.zoom = 1.0;
reader.readerView.allowsPinchZoom=NO;
reader.readerView.showsFPS=YES;
reader.readerView.tracksSymbols=YES;
//scan landscape only (this also improves performance)
[scanner setSymbology:ZBAR_CODE39 config:ZBAR_CFG_X_DENSITY to:0];
[scanner setSymbology:ZBAR_CODE39 config:ZBAR_CFG_Y_DENSITY to:1];