I wrote:
Image processing techniques have been widely used for detecting defects in industrial equipment.
Maybe I could write it as:
Image processing techniques have been widely used for the detection of defects in industrial equipment.
In many case, I have seen a gerund is used after "for". I would like to know is it a rule or a noun form of a verb like "detection" is also can be used? is there any difference?