I am using torch with some semantic segmentation algorithms to produce a binary mask of the segmented images. I would then like to crop the images based on that mask. To be clea
Use OpenCV .copyTo with the mask option
http://docs.opencv.org/2.4/modules/core/doc/basic_structures.html#mat-copyto