# 2D/3D Multimode Medical Image Alignment Based on Spatial Histograms
## 1 Introduction  
Image-guided surgery, which involves computer vision, biomedicine, imaging, automatic control, and other disciplines, is an interdisciplinary research direction [1]. Through the comprehensive application of a variety of medical image information [2], it carries out the preoperative diagnosis [3; 4; 5; 6; 7], disease analysis [8; 9], planning of the surgical path, intraoperative localization of the lesion, real-time tracking of surgical instruments [10], and adjustment of the spatial position of surgical instruments to achieve an accurate diagnosis--so as to provide groundbreaking and precise treatment [11]. This technology provides many benefits for patients, such as reducing surgical trauma, speeding up recovery, and reducing hospital stay and costs. The accurate image information in image-guided surgery is obtained by integrating preoperative and intraoperative images and navigation technology [12; 13]. Usually, high-resolution three-dimensional scanning methods such as MRI, CT, and PET are used to obtain the desired image of the anatomical region of interest [14; 15]. This image with high-resolution characteristics and more spatial information can better reflect the human tissue structure and physiological information. However, the imaging time is extended, which is not conducive to the surgical environment. The data used in the operation are two-dimensional ultrasound, \(\chi\)-ray, and optical images [16]. These two-dimensional images have the characteristics of fast imaging and low radiation, adapting to the operating environment. However, their resolution is low, so it is difficult to obtain accurate and complete lesion location and texture information. Therefore, a three-dimensional image is needed to display higher-dimensional information. In image-guided surgery, the preoperative and intraoperative images are mapped to the same coordinate system by comparing the corresponding information in the same tissue or organ to keep the anatomical structure consistent [2]. Preoperative and intraoperative data registration and surgical instrument tracking provide surgeons with information about the instrument's current position relative to the planned trajectory, nearby vulnerable structures, and the final target in image-guided minimally invasive surgery. Pre-intervention images withX-ray or ultrasound images in interventional radiology make tools such as catheters and needles visible, significantly improving navigation accuracy. In image-guided endoscopic surgery, 3D virtual images of anatomy and pathology are generated from preoperative images and registered in real-time endoscopic images. Through augmented reality visualization, anatomical structures hidden under tissues can be displayed. In extracorporeal radiotherapy, the registration of planned CT images and daily pre-treatment images can achieve accurate patient positioning, which is essential for accurate targeted dose delivery and avoiding exposure of health-critical tissues. Image-guided surgery's success largely depends on preoperative and intraoperative image data registration accuracy and 2D/3D registration [17; 18; 19; 20]. Image registration is developed for the integration of multisource image information. Image registration's main purpose is to find the spatial transformation mapping relationship between two or more images in the same location to obtain the maximum image information [11; 21; 22; 23]. These images can come from different times, different imaging equipment, or different angles. After registration, the spatial pose and texture information is consistent. The images that need registration due to spatial transformation are called moving images [24; 25; 26]. The standard images without transformation are called reference images. Spatial transformation can be linear or nonlinear. Researchers have proposed a new method called intensity distance [27; 28]. The essence of gray distance information is to add the Euclidean distances of all pixels with the same gray value.