In the image acquisition process, some issues such as uneven exposure caused by mechanical equipment, weather conditions and other reasons will make the quality of the taken picture poor and unable to meet the needs of practical applications. When the traditional Retinex algorithm is applied to enhance the image, it will cause the problems such as blurred image edges and graying. Therefore, aiming at the existing problems of the traditional Retinex algorithm, this paper proposes a novel image enhancement algorithm: Retinex image enhancement algorithm based on L0-norm. Firstly, the contour components of the image are extracted by the global L0 gradient minimization method and processed by the Retinex algorithm, and then the extracted contour components are fused to the original image to realize the enhancement of the original image. In the implementation of the algorithm, different global L0 gradient minimization factors are used to ensure the uniform enhancement of contour components at different scales. Experimental results show that the proposed algorithm can better preserve the edge information of the image while enhancing the contrast of the image.