A computed tomography (CT)-guided robotic needle requires registration to transfer coordinates between the robot and CT image for accurate insertion. In our previous work, we proposed a geometric marker that allows direct registration between a CT image and robot and demonstrated its proof of concept. In this paper, we present a registration algorithm for calculating the six-degrees-of-freedom error of one CT scan, and we demonstrated the registration with our needle insertion robot. We obtained its geometric shape from differences between multiple images, which we converted into the coordinate axes of the marker, to calculate the posture of the marker. Since the algorithm uses changes in the cross-sectional shapes of images, it can be adapted for markers of different sizes. In the evaluation, the registration error for insertion by the CT-guided robotic needle with the proposed algorithm was calculated to be 1.8 mm and 0.35°. The accuracy of the proposed algorithm is sufficient for lower abdominal insertion and shows its potential for clinical applications. When the markers are half the size of the original, the rotational error is the same as the original, but the positional error is about half. This suggested the possibility of miniaturizing the marker.