An image processing method comprising: determining image gradient indications (S312) for at least one image; determining filter costs (S314) for image regions based on the determined image gradient indications for the at least one image; processing data relating to the at least one image including applying a filtering operation (S316) using the determined filter costs for the image regions, so that the processing is performed for image regions in dependence upon image gradients of the at least one image; characterised by : determining a type mask (S310) which includes type indicators for image regions to thereby categorise each of the image regions into one of a plurality of types; wherein said processing data relating to the at least one image comprises, for each of a plurality of the image regions,: using the filtering operation to determine the lowest cumulative cost (S404) along a path from the image region to an image region of a particular type according to the type indicators; and selectively setting the type indicator (S414) for the image region to indicate the particular type in dependence on a comparison of the determined lowest cumulative cost with a threshold. determining image gradient indications (S312) for at least one image; determining filter costs (S314) for image regions based on the determined image gradient indications for the at least one image; processing data relating to the at least one image including applying a filtering operation (S316) using the determined filter costs for the image regions, so that the processing is performed for image regions in dependence upon image gradients of the at least one image; characterised by : determining a type mask (S310) which includes type indicators for image regions to thereby categorise each of the image regions into one of a plurality of types; wherein said processing data relating to the at least one image comprises, for each of a plurality of the image regions,: using the filtering operation to determine the lowest cumulative cost (S404) along a path from the image region to an image region of a particular type according to the type indicators; and selectively setting the type indicator (S414) for the image region to indicate the particular type in dependence on a comparison of the determined lowest cumulative cost with a threshold. determining a type mask (S310) which includes type indicators for image regions to thereby categorise each of the image regions into one of a plurality of types; wherein said processing data relating to the at least one image comprises, for each of a plurality of the image regions,: using the filtering operation to determine the lowest cumulative cost (S404) along a path from the image region to an image region of a particular type according to the type indicators; and selectively setting the type indicator (S414) for the image region to indicate the particular type in dependence on a comparison of the determined lowest cumulative cost with a threshold. using the filtering operation to determine the lowest cumulative cost (S404) along a path from the image region to an image region of a particular type according to the type indicators; and selectively setting the type indicator (S414) for the image region to indicate the particular type in dependence on a comparison of the determined lowest cumulative cost with a threshold. <EOS>