Canny edge detector is based both on local and global image analysis, present in the gradient computation and connectivity-related hysteresis thresholding, respectively. This contribution proposes a generalization of these ideas. Instead of the sole gradient magnitude, we consider several local statistics, to take into account how much texture is present around each pixel. This information is used in biologically inspired surround inhibition of texture. Global analysis is generalized by introducing a long range connectivity analysis. We demonstrate the effectiveness of our approach by extensive experimentation.