Digital core techniques based on CT scan imaging can accurately describe the pore space of rocks, which provides a significant tool for studying the influence of rock pore structure on its macroscopic physical properties. However, with the increasingly intensive use of CT scanning in the field of petrophysics, the various artifactual interferences accompanying the imaging itself have become more prominent. Common artifacts in core CT scanning imaging include ring artifacts, star artifacts, and hardening artifacts, etc. The presence of these artifacts greatly affects the imaging quality and as a result further affect the quality of subsequent image processing and segmentation. Therefore, the correction of scanning artifacts is very important. Generally, the artifacts are eliminated by improving scanning experiments or image processing. However, these traditional artifact correction methods, especially for hardening artifacts, have some common problems, such as unclean elimination or poor applicability. To solve the problems, we propose a new method for artifact correction. In this method, we calculate a local correction curve (surface) by sliding the 3D window vertically, and use this curve (surface) to eliminate hardening artifact interference in both vertical and horizontal directions. By applying the method to the digital cores, we find that it is not only effective in removing the effects of multiple artifacts but also in preserving the original slice information. The results show that the same density voxels corrected by bi-directional artifacts in the vertical and horizontal directions were more consistent in the gray-scale distribution, which means that the corrected slices avoided over-segmentation in the central region and extracted the complete pore structure in the edge region. As a result, the corrected high-quality core slices can be obtained. On this basis, we further compare the pore aspect ratio and specific surface area parameters extracted from the corrected and non-corrected slices. It shows that the artifacts correction has a significant effect on the extraction results of pore structure parameters, which reflects the importance of artifact correction in scanning imaging.