1. A method for analyzing an image, comprising: receiving, from a prescreener, a first array defining a path-chaincode within a two-dimensional image; and applying a Sobel operator adjacent elements of the first array to obtain a second array of gradient directions corresponding to the first array.