The function crops image files in specific size. In this method, there are several subfolders under the source folder and every subfoler has one kind of images.
Parameter settings:
- src_dir: source directory
- dst_dir: destination directory
- format: file format of images in source directory
- spacing: cropping interval, so every patch is in spacing×spacing