We present AstroContour, an open-source Python-based image processing tool designed for the detection, extraction, and analysis of contours in astronomical imagery. Developed using the OpenCV computer vision library, the code applies a sequence of pre-processing steps—such as grayscale conversion, noise reduction, thresholding, and morphological operations—followed by contour detection and refinement techniques. This approach is optimized for identifying the outlines of celestial objects, including lunar crescents, planetary disks, and other extended sources, under varying atmospheric and imaging conditions. The framework is adaptable to both raw and pre-processed astrophotographic data, enabling researchers to isolate features of interest, measure geometric parameters, and prepare datasets for further scientific analysis. AstroContour provides a reproducible, modular, and extensible workflow for astronomers, educators, and citizen science projects engaged in observational astronomy.