How to crop image based on binary mask

后端 未结 5 619
盖世英雄少女心
盖世英雄少女心 2021-02-10 03:27

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

5条回答
  •  终归单人心
    2021-02-10 03:40

    Use OpenCV .copyTo with the mask option

    http://docs.opencv.org/2.4/modules/core/doc/basic_structures.html#mat-copyto

提交回复
热议问题