How to remove images in directory with code if there is no significant edges after edge detection

Does anyone can suggest how to remove images from the folder after you know that you can’t do much edge detection (less edge detection points) on some images?