## 3 Materials and Methods
### SIFT-Based Model  
There are several image keypoint descriptors presented in computer vision literature. Among them, the Scale-Invariant Feature Transform (SIFT) [10] is largely used for many applications. The SIFT signatures are formed by calculating the gradient at each pixel in a window patch around the interest keypoint using the appropriate level of scale in which the interest keypoint can be detected. Figure 3 illustrates the process of calculating the gradient orientations and magnitudes for each pixel, which are then weighted by a Gaussian function. On the right side of the figure, a weighted gradient orientation histogram has been computed for each patch using  
trilinear interpolation. Although the figure simplifies the process by showing an 8 \(\times\) 8 pixel patch and a 2 \(\times\) 2 descriptor vector, [PERSON]'s actual implementation utilizes 16 \(\times\) 16 patches and a 4 \(\times\) 4 array of eight-series histograms. Using this descriptor, the proposed SITF-based model for automatic slice planning of magnetic resonance images is illustrated in Figure 4. The image descriptors are constructed for key points chosen manually by the MRI operators and specialists from the training image. These image descriptors are used to build the trained model. From the test image, several descriptors are extracted in a region of interest. These descriptors are classified according to the trained model to recognize key points, which are then used for automatic slice planning. Feature extraction is the first stage where various image processing techniques are applied to identify key points, edges, textures, and patterns within the cropped brain images. Once the features are extracted, the next stage is feature selection. In this stage, the most relevant and informative features are chosen from the initially extracted set. This is done to reduce the dimensionality of the data and to eliminate any redundant or irrelevant features that do not contribute significantly to the descriptor's discriminative power. Feature selection techniques may include statistical methods, machine learning algorithms, and domain-specific heuristics. Figure 4: Overall procedure chart for the SIFT-based model. Figure 3: A schematic representation of [PERSON]’s Scale-Invariant Feature Transform (SIFT). The final stage is feature representation, where the selected features are transformed into a structured format suitable for analysis. This typically involves converting the features into a vector or matrix form that can be easily manipulated by computer vision algorithms. The resulting descriptors provide a compact and informative representation of the brain images, encapsulating the key characteristics needed for tasks such as classification, segmentation, and anomaly detection. Training and Testing  
In the training images, the manual placement of keypoints allows for precise control over their positioning, ensuring that they accurately represent the anatomical landmarks of interest. Each keypoint is accompanied by its SIFT descriptor, which captures the local gradient information around the keypoint, providing a detailed and distinctive representation of the feature. This manual process, while time-consuming, is essential for creating a reliable reference set of keypoints and descriptors that can be used to guide the alignment and matching of test images. For the test images, a uniform distribution of keypoints and their descriptors is created. This approach ensures that keypoints are spread evenly across the entire image, providing comprehensive coverage of the anatomical region. The uniform distribution helps in capturing a wide range of features and reduces the likelihood of missing critical details. Each keypoint in the test image is also associated with a SIFT descriptor, enabling robust comparison with the descriptors from the training image. In the next step, these descriptors are compared in the matching phase. The matching phase involves comparing the descriptors from the training and test images to identify corresponding keypoints.