An image processing method comprising: determining image gradient indications for at least one image; determining filter costs 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 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 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 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 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 for at least one image; determining filter costs 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 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 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 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 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 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 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 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 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 for the image region to indicate the particular type in dependence on a comparison of the determined lowest cumulative cost with a threshold.