iOS-CoreImage下的矩形识别

iOS-CoreImage下的矩形识别

本项目是对上一个项目的进一个优化修改(使用透视变换矫正扭曲的图(opencv)矩形边缘检测(原生CoreImage框架下CIDetector))

主要优化的内容就是去掉了拍照的按钮,进入到相机下,自动识别出物体,不用再点击拍照按钮了,从而实现实时智能识别。

具体能够识别的物体就是A4纸一样的内容物体,

即图片宽和高符合如下规定

if (data.size.width>2100 && data.size.height >3100 && borderDetectFeature) {

                    MADCropScaleController *vc = [[MADCropScaleController alloc] init];

                    vc.borderDetectFeature = borderDetectFeature;

                    vc.cropImage = data;

                    [strongSelf presentViewController:vc animated:YES completion:nil];

        }else{

        }

若是需要识别其他规格的物体请修改自己的设定

demo:

https://github.com/mrzhao12/CoreImage-RectangularRecognition


 

一个脱离iOS开发的iOS 开发人员

你可能感兴趣的:(iOS-CoreImage下的矩形识别)