Nested Named Entity Recognition (NER) is a fundamental task in natural language processing. Span-based methods treat entity recognition as a span classification task, effectively handling nested entities. Existing methods organize sentence spans into a two-dimensional plane, where each unit represents a span, similar to pixels in an image. Subsequently, edge detection techniques from image processing are employed to enhance and extract semantic edge features of entities in planarized sentence representation by using gradient operators. However, existing gradient operator-based approaches neglect multi-directional edge features between adjacent spans. To address this limitation, a nested NER method for multi-directional gradient feature extraction was proposed. This method treated entity positions as pixels in an image. Leveraging the gradient properties of edges, an eight-direction Sobel operator was employed to extract more comprehensive and discriminative semantic edge features in the planarized sentence representation. The proposed method achieves F1 scores of 88.01% and 81.23% on the ACE 2005 Chinese dataset and the GENIA English dataset, respectively, demonstrating its effectiveness for nested NER tasks. Additionally, it also achieves F1 score of 92.52% on the CoNLL2003 English flat dataset, validating its scalability.