Precise segmentation of cracks is essential to characterize the structural properties of a rock specimen under compressive force. A two-dimensional internal cross-sectional image of rock can be created using X-ray computed tomography (CT scanning). Cracks in rocks usually have very poor local contrast which makes it difficult to detect and segment cracks from the background using existing popular edge detection algorithms. In this paper, we propose a two-dimensional matched filtering technique followed by local entropy based thresholding, morphological operators and length filtering to detect and segment cracks from the cross-sectional images of rock. The proposed algorithm is tested on several macroporous plaster specimens. Experimental results demonstrate the effectiveness and robustness of the algorithm compared to hand-labeled ground truth segmentations.