opencv transparent überblenden
-
hallo,
wie kann ich auf einem IplImage ein anderes IplImage oder eine Farbe halbtransparent überblenden.
etwa wie im folgendem Beispiel mit TBitmap und scanline farbe halbtransparent überblendenPRGBTriple dstRow; int Alpha = 2; int _rgb = ColorToRGB(clBlue); int _r = GetRValue(_rgb); int _g = GetGValue(_rgb); int _b = GetBValue(_rgb); for(y=t; y<bitmap->Height; y++){ dstRow = (PRGBTriple)bitmap->ScanLine[y]; for(int x=0; x<bitmap->Width; x++){ dstRow[x].rgbtBlue=(dstRow[x].rgbtBlue*Alpha+_b) / (Alpha+1); dstRow[x].rgbtGreen=(dstRow[x].rgbtGreen*Alpha+_g) / (Alpha+1); dstRow[x].rgbtRed=(dstRow[x].rgbtRed*Alpha+_r) / (Alpha+1); } }grüße Trulli