A method for localization and identification of a structure in a projection image with a system having a known system geometry, includes acquiring a preoperative computer-tomography or CT image of a structure, preprocessing the CT-image to a volume image, acquiring an intraoperative two dimensional or 2D X-ray image, preprocessing the 2D X-ray image to a fix image, estimating an approximate pose of the structure, calculating a digitally reconstructed radiograph or DRR using the volume image, the estimated pose and the system geometry, and calculating a correlation between the generated DRR and the fix image, with a correlation value representing matching between the generated DRR and the fix image. The method significantly decreases the number of wrong-level surgeries and is independent of the surgeons ability to localize and/or identify a target level in a body.