Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
320 views
in Technique[技术] by (71.8m points)

iphone - DETECT the Edge of a Document in iPhoneSDK

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...