Conceptually, a picture is just a two dimensional array of pixel values:
typedef double value_type;
value_type red, green, blue, alpha;
Color color ;
// The picture
Pixel picture [WIDTH][HEIGHT];
However, to get a good grasp on this, read the spec for the raw picture-data your camera produces.
Also for this project, better to use C or C++, not Objective-C.
Yes, multiple algorithms is the way to go.
But, before tackling this project head-on, make sure that you understand the full magnitude of the problem by solving a few simple problems first.
For example, given a 2D array of numbers, in the range [0, 1], determine if it contains:
- a triangular boundary;
- a rectangular boundary; or
- a circular boundary.
A boundary is a closed sequence of row-column-index pairs denoting the points where the array has the same value (zero, for example.)