Phase unwrapping is an integral part of multiple imaging techniques, and as a result, a wide range of algorithms have been created to unwrap phases. One such algorithm is the minimum Lp-norm phase unwrapping algorithm. This algorithm transforms the phase unwrapping problem into a minimization problem of a certain functional, which it solves with an iterative method. However, the problem is usually not convex, and when there are many sharp edges in the data to be unwrapped, the algorithm often produces a local minimum with new discontinuities in originally smooth areas. To prioritize solutions which minimize the functional better in smooth areas, we use weights to deprioritize data lying along edges in the ground-truth image. This requires a method to find ground-truth edges using the wrapped image, which we describe. When using the modified algorithm, we generally obtain improved results on images with multiple edges (both lower errors and more correct edge placement).