A method of determining a dominant gradient direction of an image area comprising a plurality of pixels of an image, the method characterized by : sampling the image area to determine first, second, third, and fourth samples at respective first, second, third, and fourth locations in the image area , wherein a first direction between the first and third locations is perpendicular to a second direction between the second and fourth locations, and wherein each of said first, second, third, and fourth locations is disposed at a respective junction of a plurality of adjacent first pixels of the image area, a plurality of adjacent second pixels of the image area, a plurality of adjacent third pixels of the image area, and a plurality of adjacent fourth pixels of the image area such that the first, second, third, and fourth samples comprise an average of a plurality of samples associated with the first pixels, an average of a plurality of samples associated with the second pixels, an average of a plurality of samples associated with the third pixels, and an average of a plurality of samples associated with the fourth pixels, respectively; determining a first gradient magnitude for the first direction based on the first and third samples; determining a second gradient magnitude for the second direction based on the second and fourth samples; and determining the dominant gradient direction of the image area based on an arctangent of a ratio between the first and second gradient magnitudes. sampling the image area to determine first, second, third, and fourth samples at respective first, second, third, and fourth locations in the image area , wherein a first direction between the first and third locations is perpendicular to a second direction between the second and fourth locations, and wherein each of said first, second, third, and fourth locations is disposed at a respective junction of a plurality of adjacent first pixels of the image area, a plurality of adjacent second pixels of the image area, a plurality of adjacent third pixels of the image area, and a plurality of adjacent fourth pixels of the image area such that the first, second, third, and fourth samples comprise an average of a plurality of samples associated with the first pixels, an average of a plurality of samples associated with the second pixels, an average of a plurality of samples associated with the third pixels, and an average of a plurality of samples associated with the fourth pixels, respectively; wherein a first direction between the first and third locations is perpendicular to a second direction between the second and fourth locations, and wherein each of said first, second, third, and fourth locations is disposed at a respective junction of a plurality of adjacent first pixels of the image area, a plurality of adjacent second pixels of the image area, a plurality of adjacent third pixels of the image area, and a plurality of adjacent fourth pixels of the image area such that the first, second, third, and fourth samples comprise an average of a plurality of samples associated with the first pixels, an average of a plurality of samples associated with the second pixels, an average of a plurality of samples associated with the third pixels, and an average of a plurality of samples associated with the fourth pixels, respectively; determining a first gradient magnitude for the first direction based on the first and third samples; determining a second gradient magnitude for the second direction based on the second and fourth samples; and determining the dominant gradient direction of the image area based on an arctangent of a ratio between the first and second gradient magnitudes. <EOS>