-findEdgeColor:imageColors: relies on the image having a minimum size in order to work effectively. If the image is too small, there aren't enough repeated edge colors to get past randomColorsThreshold. Furthermore, it might be a good idea to accumulate colors from the other edges, as well as to give the edge a certain pixel width. Finally, it's important for this method to return some color; after all, what does it mean for an image to have "no" background color?