DETECT the Edge of a Document in iPhoneSDK(在 iPhoneSDK 中检测文档的边缘)

本文介绍了在 iPhoneSDK 中检测文档的边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找类似于附加图像的东西,我如何在 iPhoneSDK 中实现它.

谁能建议我一些开源 API算法代码 来检测文档捕获图像的角落.

Some How,我有一个名为 OpenCV 的开源 API,它可以识别

在第 10-6 页有对轮廓检测功能集的参考:

CvContourScanner cvStartFindContours(IplImage* img,CvMemStorage* 存储,整数标头大小,CvContourRetrievalMode 模式,CvChainApproxMethod 方法);int cvFindContours(IplImage* img,CvMemStorage* 存储,CvSeq** firstContour,int headerSize=sizeof(CvContour),CvContourRetrievalMode 模式=CV_RETR_LIST,CvChainApproxMethod 方法=CV_CHAIN_APPROX_SIMPLE );

希望对你有帮助.

当您的问题是如何在 ios/iPhone 上使用 OpenCV 时,您可以查看以下站点.用于 iOS 项目的现成 XCode 项目文件:

http://www.eosgarden.com/en/opensource/opencv-ios/overview/

可以在这里找到另一个包含非常有价值信息的 StackOverflow 帖子:

iPhone 和 OpenCV

I am looking something like attached image, How can I implement this in iPhoneSDK.

Can anybody suggest me some open source API or Algorithm Code to detect the corners of captured image of a document.

Some How, I got an open source API called OpenCV which recognize the Human Face very well. I want to use the same API if possible.Now the problem Is how can I make the changes in those static libraries according to my requirement to Scan the Document edges. Alternatively,

how to detect for the square/rectangle object in the captured image ?

解决方案

When you are already using openCV you might know the Reference Manual:

http://www.sciweavers.org/books/opencv-open-source-computer-vision-reference-manual

On page 10-6 there is a reference to the set of contour detection functions:

CvContourScanner cvStartFindContours(IplImage* img, 
                                     CvMemStorage* storage, 
                                     int headerSize, 
                                     CvContourRetrievalMode mode, 
                                     CvChainApproxMethod method );

int cvFindContours( IplImage* img, 
                    CvMemStorage* storage,
                    CvSeq** firstContour, 
                    int headerSize=sizeof(CvContour),
                    CvContourRetrievalMode mode=CV_RETR_LIST,
                    CvChainApproxMethod method=CV_CHAIN_APPROX_SIMPLE );

I hope that helps.

When the target of your question was, how to use OpenCV on ios/iPhone then you can have a look at the following Sites. Ready made XCode project files for use in an iOS project:

http://www.eosgarden.com/en/opensource/opencv-ios/overview/

Another StackOverflow post with very valuable information can be found here:

iPhone and OpenCV

这篇关于在 iPhoneSDK 中检测文档的边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!