A method system and program product are provided for x ray pose recovery during an endoscopic procedure. An x ray image is taken with a C arm at a first pose capturing a region of an endoscope with fiducials thereon. The C arm is moved from the fist pose to a second pose at another viewing angle while maintaining the position of the endoscope. Anotherx ray image is taken with the C arm at the second C arm pose capturing the region of the endoscope with the fiducials thereon. The location of the fiducials on each x ray image is determined using segmentation. An iterative optimization is performed using the locations of the fiducials in the two x ray images to form two dimensional projections of the three dimensional curve of the region of the endoscope with fiducials thereon to determine the three dimensional translation and rotation of the C arm from the first x ray pose to the second x ray pose.