1. A method for obtaining structural information from a digital image by an electronic device, comprising: obtaining a digital image; determining a gradient vector for each pixel in a region of interest of the digital image; and transforming each pixel in the region of interest in accordance with a transform, comprising: determining, for each pixel, a first set of pixels, wherein the first set of pixels comprises any pixel along a line that is collinear with or perpendicular to the gradient vector and passes through a pixel location, and incrementing, for each pixel, a first set of values in a transform space corresponding to any of the first set of pixels that are in a first direction of the line.