The recently proposed Neighborhood-extending and Noise-smoothing Gradient Vector Flow (NNGVF) provides a better segmentation to images than the GVF in terms of noise resistance, weak edges preservation. However, the NNGVF snake still has difficulties converging into long, thin boundary indentations. In this paper, we propose a novel external force for active contour models named NNGGVF which is a generalization of the NNGVF include two spatially varying weighting functions. It improves snake's ability of convergence into long, thin boundary indentations while maintaining other desirable properties of the NNGVF, such as better noise immunity and enlarged capture range. We demonstrate the advantages of the NNGGVF on synthetic and real images.