2011-06-24 67 views
1

我正在製作Gauroud算法,並且當我計算邊緣上的點強度時,我不知道該如何處理它。我試圖決定這個問題,如:計算RGB使用強度

private int getPointRGB(double intensity) 
    { 
     float[] hsb=null; 
     double newCrRed; 
     double newCrGr; 
     double newCrBlue; 
     int nRGB; 
//crRed, crGr, crBlue - primary components of edge RGB 
     newCrRed = intensity*crRed; 
     newCrGr = intensity*crGr; 
     newCrBlue = intensity*crBlue; 
     hsb = Color.RGBtoHSB((int)newCrRed, (int)newCrGr, (int)newCrBlue, null); 
     nRGB = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]); 
    return(nRGB); 
    } 

我對嗎?

+2

這些是什麼意思:「RGB在多邊形點」,「強度」,「主要RGB」? –

+2

很難理解這個問題。你能詳細說一下嗎?也許提供關於你有的代碼和它不工作的細節...... – joeslice

+2

我的猜測是它是關於一個顏色選擇器,在3軸多邊形的RGB顏色加上一個單獨的強度選擇器。 – Kwebble

回答