\doxysection{/\+Users/kaungzinthu/\+Desktop/projectpbl2/main\+\_\+alpha\+\_\+blender.py File Reference}
\hypertarget{main__alpha__blender_8py}{}\label{main__alpha__blender_8py}\index{/Users/kaungzinthu/Desktop/projectpbl2/main\_alpha\_blender.py@{/Users/kaungzinthu/Desktop/projectpbl2/main\_alpha\_blender.py}}


This program applies gamma-\/corrected alpha blending to overlapping projector images.  


\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{classmain__alpha__blender_1_1_main_alpha_blender}{main\+\_\+alpha\+\_\+blender.\+Main\+Alpha\+Blender}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This program applies gamma-\/corrected alpha blending to overlapping projector images. 

This is for multi-\/projector edge blending. It assumes two projected images overlap horizontally and creates a smooth alpha transition in the overlap area so that the seam becomes visually less noticeable.

Main idea\+:
\begin{DoxyItemize}
\item A linear alpha ramp (fade-\/in / fade-\/out) is generated over the overlap region.
\item The ramp is then gamma-\/corrected to match how projectors actually respond to input intensity. (Projectors are not linear devices; without correction, the blended region can look too dark/light.)
\end{DoxyItemize}

Output\+:
\begin{DoxyItemize}
\item The output image is saved as a PNG with an updated alpha channel.
\item Optionally, the RGB channels in the overlap region are also multiplied by the same mask as a debug visualization (helps confirm the fade direction and mask shape). 
\end{DoxyItemize}