Reservoir rock porosity and capillary pressure data are fundamental parameters to understand the physical properties of rocks. Porosity, which shows the rock's void fraction to its bulk volume, can be measured by s techniques such as He-porosimetry, mercury injection capillary pressure (MICP) analysis, point counting analysis, and image analysis. Image analysis has for many years been used to obtain relevant data from digital microscopic images. Segmentation of images is an important technique used to partition an image into distinctive components to extract useful data. When an image is segmented, it is simplified, making it easier to understand its component parts. In this research, two-dimensional (2D) rock thin section image processing is initially applied to determine porosity. To achieve this, the K-means clustering algorithm was used to automatically segment and measure the digital rock porosity. In this regard, one hundred and nine samples were selected from approximately one thousand 2D petrographic thin-section images of the Dorood Oilfield reservoir rocks and were digitally processed and evaluated. The porosity values estimated from the image analysis agree with the porosity derived from whole-rock core analysis with a correlation coefficient of 67 %. Moreover, petrographic studies distinguished five microfacies, which relate to lagoon, shoal, mid and outer ramp depositional environments associated with a carbonate homoclinal ramp. In addition. three distinct Hydraulic Flow Units(HFUs) were determined based on K-means clustering by applying the Elbow method. Based on those clusters, permeability was estimated from HFU porosity distributions with high correlation coefficient (R = 90 %). Pore-throat size distributions and Pc curves were then estimated from thin-section image analysis based on the Pittman equations for different mercury saturation percentages. The estimated Pc curves derived from image analyses show an acceptable correlation with SCAL-derived Pc curves. Comparison between RT/HFU and depositional settings show that RT1/HFU1 belongs to the lagoon and outer ramp depositional settings, RT2/HFU2 belongs to shoal and mid carbonate ramp environments and RT3/HFU3 belongs to a shoal environment.