The underlying principle behind most optical flow algorithms is that the brightness of a pixel remains the same as it flows from one frame to the next. The first order Taylor approximation used in formulating this brightness constancy principle may not be accurate when intensity profiles change non-linearly. In this paper, we propose a method of alleviating the effect of this approximation. Instead of computing image gradients using conventional horizontal and vertical filters of fixed coefficients and sizes, we propose to obtain the gradient information by an explicit examination of ramp profiles at a given location, in all directions. The gradient information obtained using the proposed analysis is more robust under non-linear changes in intensity profiles. Our results demonstrate that by incorporating the ramp structure information as proposed, we are able to improve existing optical flow algorithms.