A computer vision application for medical image processing that segments skin lesions using the SCT-Center (Spherical Coordinate Transform) algorithm to assist in melanoma diagnosis.
This project implements a 5-step color segmentation algorithm specifically designed for analyzing melanoma images. The SCT-Center transformation decouples color information from brightness variations, making it robust for medical image analysis under different lighting conditions.
- Median Filtering: Noise reduction with configurable kernel size
- SCT-Center Transformation: Advanced color space transformation (15×15 quantization = 225 colors)
- Interactive ROI Selection: Point-and-click interface for region of interest selection
- Morphological Operations: Automatic noise removal and shape refinement
- Area Calculation: Precise measurement of segmented regions with percentage calculations
- Real-time Visualization: Live preview of segmentation results
- Applies 3×3 median filter to reduce acquisition noise
- Optional color quantization from 2²⁴ to 256 colors
- Converts RGB to spherical coordinates (L, angle A, angle B)
- Maps to 15×15 quantized color space (225 total colors)
- Decouples color information from brightness variations
- User clicks on regions of interest
- Creates RGB cubic clusters around selected points
- Adjustable delta parameter for cluster size (0-128)
- Real-time mask updates with blue overlay
- Erosion followed by dilation (opening operation)
- Uses 3×3 cross-shaped structural element
- Removes small artifacts while preserving main structure
- Generates binary mask and color overlay
- Calculates segmented area in pixels
- Computes percentage relative to total image area
- Displays results for medical analysis
- OpenCV 4.x - Computer vision library
- Visual Studio - C++ development environment
- Windows OS - Required for file dialog functionality
- Clone the repository:
git clone https://github.com/yourusername/sct-center-melanoma-segmentation.git
cd sct-center-melanoma-segmentation
- Open project in Visual Studio
- Configure OpenCV paths in project settings
- Build and run the application
- Launch Application: Run the executable
- Select Image: Choose a melanoma image file through the dialog
- View Preprocessing: Observe median filtering results
- Interactive Segmentation:
- Click on regions of interest in the SCT-Center image
- Adjust Delta slider for sensitivity (recommended: 15-25)
- Continue clicking until entire lesion is covered
- Review Results:
- Binary mask shows segmented region
- Overlay shows original image with highlighted ROI
- Area and percentage statistics are displayed
- Process Next Image: Press any key to continue with another image
Before | After |
---|---|
![]() |
![]() |
Original melanoma image | After 3×3 median filtering |
15×15 quantization producing 225 distinct colors
Real-time ROI selection with adjustable delta parameter
Binary Mask | Color Overlay |
---|---|
![]() |
![]() |
ROI in black | Blue overlay on original |
This tool assists dermatologists and medical professionals in:
- Lesion Boundary Detection: Precise segmentation of irregular melanoma shapes
- Area Measurement: Quantitative analysis for medical documentation
- Color Analysis: Identification of variegated coloring patterns
- Diagnostic Support: Objective measurement tools for clinical assessment
- Lighting Independence: SCT transformation handles varying illumination
- Color Preservation: Maintains critical color information for diagnosis
- User-Guided: Interactive selection ensures medical expertise integration
- Morphological Refinement: Automatic cleanup of segmentation artifacts
- Quantitative Output: Precise measurements for medical records
Based on the SCT-Center algorithm developed for variegated coloring identification in skin tumors. The spherical coordinate transformation provides superior color-brightness decoupling compared to traditional RGB analysis, making it particularly suitable for medical imaging applications.
- This tool is designed for research and educational purposes
- Not intended for clinical diagnosis without professional medical supervision
- Results should be validated by qualified dermatologists
- Accuracy depends on image quality and proper user interaction
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
[1] Umbaugh Scott E., "Computer Vision and Image Processing", Prentice Hall, NJ, 1998.
For questions or collaborations, please open an issue on GitHub.
Keywords: Melanoma, Medical Imaging, Color Segmentation, SCT-Center, Computer Vision, OpenCV, Skin Cancer, Image Processing