1. A method of processing a defect map of a digital image for defect correction, which map associates pixels of the digital image with corresponding locations on the map, defect entries at locations on the map being indicative of defective pixels in the image and having a defect value, and other non-defect entries at locations on the map being indicative of non-defective pixels in the image and having another value, the method being implemented at least in part using a processor and comprising: a) identifying at least one defect entry which is adjacent at least one non-defect entry; b) performing a first operation on said at least one non-defect entry to make the entry an expanded defect entry having an expanded defect value; c) performing a second operation on an entry adjacent at least one of the expanded defect entries to make the said entry an analysis entry having an analysis value if it is a non-defect entry, any defect value or expanded defect value being unchanged by the second operation; and d) repeating steps a) to c) to define i) a defect region of at least one of the defect values; ii) an expanded defect region of expanded defect values around the defect region; and iii) an analysis region of analysis values around the expanded defect region.