This project transforms raw human portrait images, often captured in uncontrolled environments, into professional studio-quality outputs. Leveraging a multi-stage enhancement pipeline, discussed elaborately as follows :
Placeholder Implementation: The StudioPortraitConverter class and its initial methods (segmentation and detailed subject enhancement) were implemented as placeholders, allowing the workflow to proceed with simulated results.
Image Loading and Initial Processing: The input image input.jpg was successfully loaded as a 2048x2048 pixel, 3-channel (color) image. A corresponding placeholder segmentation mask of the same dimensions was generated.
Lighting Correction: Contrast Limited Adaptive Histogram Equalization (CLAHE) was applied to the lightness (L) channel of the image (after converting to LAB color space) to correct lighting and enhance contrast.
Subject Enhancement: A bilateral filter was used for skin smoothing, applied selectively to the subject area defined by the segmentation mask. More advanced eye and lip enhancements were acknowledged as areas for future development.
Dynamic Bokeh Effect: A Gaussian blur was applied to the background of the image, which was then blended with the enhanced, sharp subject using the segmentation mask to create a shallow depth-of-field effect.
Studio Color Grading: A custom color grading algorithm was implemented, which adjusted overall brightness and contrast, and applied subtle channel-specific modifications (e.g., boosting red and blue, slightly reducing green) to achieve a studio aesthetic.
Vignette Effect: A soft radial vignette effect was added by applying a Gaussian gradient mask to gently darken the image edges, drawing focus towards the center.
Final Output: The comprehensive enhancement pipeline successfully processed the raw input image through all specified steps, saving the final studio-quality portrait to output_portrait.jpg.