edge detect with binary mask

asked 2017-01-23 06:15:06 -0500

chengweige gravatar image

Hi all, i want to apply edge detection with a binary mask, i used the function copyTo() by a mask to set the unwanted region pixels to zero, then i invoked the edge detector(like canny), but in this way, the border of the binary mask is also detected as the edge, so what is the correct way to extract the true edge with a binary mask?

edit retag flag offensive close merge delete



first apply Canny then set unwanted region to zero using mask.

sturkmen gravatar imagesturkmen ( 2017-01-23 06:44:47 -0500 )edit