Edge detection and removal on iphone (using opencv, objective-c, and xcode)
===

i have a project similar to what iphone scanner apps do (docscanner, scannerpro, etc).
but i'm new to opencv and objective-c. the app is supposed to detect and remove the edges/background of a document/paper taken a photo of using an iphone. 

i've seen this http://stackoverflow.com/questions/8921256/detect-the-edge-of-a-document-in-iphonesdk which is what i want to do. i've seen what canny does but all it shows are edges of all shapes in the image, not the paper i want to separate. 

i think this is what i'm supposed to do: http://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecting-a-sheet-of-paper-square-detection/ but i can't make it work in xcode.

and i don't know how to do it (being a newbie). i've looked hard everywhere and couldn't find a way to detect edges of a document and crop them from the image. or maybe i found something but i didn't understand. i'm supposed to code it in xcode and objective-c.