在 iPhoneSDK 中检测文档的边缘

发布于 2024-12-27 21:47:32 字数 456 浏览 5 评论 0原文

我正在寻找类似于附图的内容,我如何在 iPhoneSDK 中实现它。

任何人都可以建议我一些开源 API算法代码来检测捕获的文档图像的角点。

不知怎么的,我得到了一个名为OpenCV的开源API,它可以识别人脸 非常好。如果可能的话,我想使用相同的 API。现在的问题是如何根据我扫描文档边缘的要求对这些静态库进行更改。 或者

如何检测捕获图像中的正方形/矩形对象?

在此处输入图像描述

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 ?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唯憾梦倾城 2025-01-03 21:47:32

当您已经使用 openCV 时,您可能知道参考手册:

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

第 10-6 页上有一组轮廓检测函数的参考:

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 );

我希望这有帮助。

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

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

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

iPhone 和 OpenCV

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文