If all that you want to do is detect the presence of a line within a scene, a Hough transform line detector may be what you want. I have an implementation of this that runs on live video within my open source GPUImage framework.
The GPUImageHoughTransformLineDetector class will take in an image from the camera (or a still image or video) and provide a callback block with the slopes and intercepts of lines it detects within the scene. This is an example of it picking out the edges within this keyboard:
I have to warn you that the detection is a little noisy right now, due to the limited dynamic range in my parallel coordinate space implementation, but I'm trying to clean that up using some iOS 6.0 OpenGL ES extensions.