A method for scaling an image of a first size, the method comprising: detecting the geometry of the image by generating a first edge map comprising an edge magnitude for each pixel of said image and a second edge map comprising an edge direction for each pixel of said image; scaling the image to a second size; resizing the first and second edge maps to the second size; clamping the first edge map, wherein each pixel of the first edge map less than a threshold is set to a value of zero; generating a bank of two-dimensional filters by: • generating a one-dimensional horizontal filter with a first cut-off frequency; • generating a one-dimensional vertical filter with a second cut-off frequency less than the first frequency; • performing an outer product function on the horizontal and vertical filter to generate an unrotated two-dimensional filter; and • rotating the unrotated two-dimensional filter into a plurality of different directions and storing one directional two-dimensional filter for each of the plurality of different directions; and filtering the scaled image by selecting, for each pixel of the scaled image: • a filter without orientation if the edge magnitude of corresponding pixel in the first edge map is zero, or • otherwise, the directional two-dimensional filter of said bank having the direction closest to the edge direction of corresponding pixel in the second edge map. detecting the geometry of the image by generating a first edge map comprising an edge magnitude for each pixel of said image and a second edge map comprising an edge direction for each pixel of said image; scaling the image to a second size; resizing the first and second edge maps to the second size; clamping the first edge map, wherein each pixel of the first edge map less than a threshold is set to a value of zero; generating a bank of two-dimensional filters by: • generating a one-dimensional horizontal filter with a first cut-off frequency; • generating a one-dimensional vertical filter with a second cut-off frequency less than the first frequency; • performing an outer product function on the horizontal and vertical filter to generate an unrotated two-dimensional filter; and • rotating the unrotated two-dimensional filter into a plurality of different directions and storing one directional two-dimensional filter for each of the plurality of different directions; and • generating a one-dimensional horizontal filter with a first cut-off frequency; • generating a one-dimensional vertical filter with a second cut-off frequency less than the first frequency; • performing an outer product function on the horizontal and vertical filter to generate an unrotated two-dimensional filter; and • rotating the unrotated two-dimensional filter into a plurality of different directions and storing one directional two-dimensional filter for each of the plurality of different directions; and filtering the scaled image by selecting, for each pixel of the scaled image: • a filter without orientation if the edge magnitude of corresponding pixel in the first edge map is zero, or • otherwise, the directional two-dimensional filter of said bank having the direction closest to the edge direction of corresponding pixel in the second edge map. • a filter without orientation if the edge magnitude of corresponding pixel in the first edge map is zero, or • otherwise, the directional two-dimensional filter of said bank having the direction closest to the edge direction of corresponding pixel in the second edge map.