Math.Pow(rgbValues[i * 3] - kAver[j * 3], 2);
}
double temp = 100000;
for (int j = 0; j < numbers; j++)
{
if (kTemp[j] < temp)
{
temp = kTemp[j];
order = j;
}
}
kNum[order]++;
kSum[order * 3 + 2] += rgbValues[i * 3 + 2];
kSum[order * 3 + 1] += rgbValues[i * 3 + 1];
kSum[order * 3] += rgbValues[i * 3];
segmentMap[i] = Convert.ToByte(order);
}
for (int i = 0; i < numbers; i++)
{
if (kNum[i] != 0)
{ 彩色图像的分割处理程序设计+Hough算法(15):http://www.751com.cn/jisuanji/lunwen_1067.html