Global Navigation Satellite System (GNSS) technology supports precise positioning across various fields, including autonomous driving and smartphone applications. In these applications, high accuracy is increasingly essential. However, achieving reliable GNSS positioning in urban environments remains challenging due to non-line-of-sight (NLOS) signals caused by reflection and diffraction from building surfaces, which significantly reduce positioning accuracy. Various methods have been proposed by researchers to detect and mitigate NLOS signals. This paper studied the performance of three positioning algorithms under NLOS mitigation near building edges, including single point positioning (SPP), precise point positioning (PPP), and real-time kinematic positioning (RTK). To detect NLOS satellites, a sky-pointing fish-eye camera captured images of the sky, and a deep learning-based semantic segmentation model was applied to determine satellite visibility. Subsequently, a down-weighting strategy that considers NLOS satellites in proximity to building edges was employed to mitigate their impact. The proposed method was tested through two experiments: a static test in a mid-density urban environment and a kinematic test in a challenging dynamic scenario. The results show that after down-weighting the NLOS signals, the horizontal root mean square errors of SPP, PPP, and RTK in the static experiment were reduced by 20%, 21.6%, and 33.1%, respectively. In the kinematic experiment, the proportion of solutions with 2D errors less than 5m improved by 65.1%, 27.9%, and 32.2%, respectively.