Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 1.46 KB

File metadata and controls

2 lines (2 loc) · 1.46 KB

Thresholding, Watershed Segmentation, Laplacian Edge Detection, Histogram Equalization, and Filter Application

This Python script showcases a range of image processing techniques commonly used in medical imaging analysis. The script focuses on analyzing the chambers of the heart and brain tumors using various methods. Each technique is implemented separately and accompanied by descriptive comments. The first part applies thresholding to extract the heart chambers from the 'Heart.pbm' image, demonstrating the threshold value and resulting binary image. The next section employs thresholding techniques on the 'brain.tech.pgm' image to isolate the brain tumor, showcasing both the tumor segmentation and its inverse. The script then explores the watershed method for image segmentation, explaining its principles, advantages, and weaknesses, and applies it to segment the brain tumor in 'brain.tech.pgm'. Next, the Laplacian of Gaussian (LoG) operator is used for edge detection in both 'Heart.pbm' and 'brain.tech.pgm', with different sigma values, highlighting the detected edges alongside the original images. Histogram equalization is applied to enhance the contrast of both images, displaying the improved results. Lastly, a filter is applied to 'Heart.pbm' with varying alpha (α) and sigma (σ) values, showcasing the filtered images. The script utilizes Python libraries such as OpenCV, numpy, and pyplot, providing a comprehensive demonstration of medical imaging techniques.