Abstract:X-ray shading artifacts lead to CT number inaccuracy, image contrast loss and spatial nonuniformity, and therefore are considered as one of the fundamental limitations of cone-beam CT(CBCT). In order to solve this problem, a novel shading correction method was proposed. First, a multi-threshold segmentation algorithm was used to segment the original CT image for constructing a template image where each structure is filled with the same CT number of a specific tissue type. Then, the L0 norm smoothing algorithm was used to smooth the CBCT image for constructing an image without texture. By subtracting the template from the image without texture, the residual images from various error sources were low-pass filtered to generate the estimated shading artifacts. Finally, the estimated shading artifacts were added back to the original image for shading correction. Compared with the CT image without correction, the proposed method reduced the overall CT number error from over 115 HU to be less than 13 HU and decreased the nonuniformity from over 9% to be less than 1%. The experimental results demonstrate that the proposed shading correction method using L0 norm smoothing and image segmentation can effectively correct the shading artifacts and its feasibility in clinical application is validated.