## 1 Introduction  
Medical image analysis is one of the most rapidly growing fields of study. It combines image recognition with clinical analysis methods to process digital images [1; 2; 3]. Recent advances in medical image analysis research have contributed to developing a digital system-based solution to reduce the use of invasive approaches [4; 5; 6]. Color fundus retinal images and brain magnetic resonance images (MRI) images are analyzed to diagnose diseases such as eye- and brain-related abnormalities. Eye diseases such as Diabetic Retinopathy (DR) are diagnosed by carefully analyzing retinal color fundus images [7]; the analysis of retinal images for DR is based on the condition of the vessels, and damage to the vessel network results in loss of vision [8; 9]. DR occurs when retinal changes have progressed to the point where treatment is complicated, and the risk of vision loss has increased manifold [10; 11]. The prevalence of eye diseases such as DR is rising [12], lowering people's quality of life. On the other hand, MRI brain images are used to detect abnormalities and tumors in the brain. According to economic reports, people who are 40 years old and above have vision loss, particularly in developed countries [11; 13]. The Australian Eye Study discovered that one in every three people has DR, indicating that DR is still one of the top five causes of irreversible blindness in adults in developed countries [11]. According to a recent study conducted in 33 countries, one out of every three diabetics and one out of every twenty people has an eye disease [14; 15]. Furthermore, diabetes is one of the world's major health problems, with 50 to 350 million diabetic cases expected over the next 25 years [11; 16; 17]. Fundus images have been researched in recent years. It has been discovered that the retinal vasculature is critical for diagnosing DR [13], along with observation of the loss of retinal capillaries in the network of retinal vessels called the foveal avascular zone (FAZ). Enlargement of the FAZ indicates disease progression. The specific area of FAZ is shown by color fundus images and FFA images [18]. Previous research on fundus image analysis by [19] found that the size of the FAZ increases with the severity of the DR. Traditional retinal photography is known as fundus fluorescein angiography (FFA). The FFA works by rapidly injecting fluorescein dye into the arterial system. FFA is made up of three significant steps. The first step is how the dye circulates in the retinal blood vessels, how it reaches the retina and choroid, and how it stays in circulation [20; 21]. The second step is to record any details of the pigment epithelium and retinal circulation that are not visible. The third step is how to obtain a clear view of the retinal vessels. Most of the research published thus far has focused on determining FAZ from FFA images. There is a need to analyze the FAZ area from color retinal images for a proper non-invasive diagnosis of eye disease [22; 23] because the FAZ area is devoid of blood vessels. The widening of the vessels in the FAZ area indicates disease progression, so the proper segmentation of retinal blood vessels is critical. The brain MRI, another imaging modality used in this study, is one of the advanced medical imaging modalities validated as an effective tool for studying the human brain [17; 24]. A brain MRI provides information on soft tissue anatomy, which has significantly improved the visual quality of the brain image. Images obtained from brain MRI scans typically require computerized methods such as image processing techniques for classification to detect brain abnormalities or tumors [25]. The objective of this research work is to address the issue of improving medical images such as retinal images and brain MRIs by validating the McCann Retinex algorithm. These types of images suffer from low-varying contrast and noise. This enhancement technique is used as preprocessing for further segmentation to diagnose disease.