彩色图像的分割处理程序设计+Hough算法(14)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

彩色图像的分割处理程序设计+Hough算法(14)


                        kAver[i * 3 + 1] = kOldAver[i * 3 + 1] = Convert.ToInt16(i * 255 /
                        (numbers - 1));
                        kAver[i * 3] = kOldAver[i * 3] = Convert.ToInt16(i * 255 / (numbers -
                        1));
                    }
                    int count = 0;
                    while (true)
                    {
                        int order = 0;
                        for (int i = 0; i < numbers; i++)
                        {
                            kNum[i] = 0;
                            kSum[i * 3 + 2] = kSum[i * 3 + 1] = kSum[i * 3] = 0;
                            kAver[i * 3 + 2] = kOldAver[i * 3 + 2];
                            kAver[i * 3 + 1] = kOldAver[i * 3 + 1];
                            kAver[i * 3] = kOldAver[i * 3];
                        }
                        //归属聚类
                        for (int i = 0; i < bytes; i++)
                        {
                            for (int j = 0; j < numbers; j++)
                            {
                                kTemp[j] = Math.Pow(rgbValues[i * 3 + 2] - kAver[j * 3 + 2],
                                2) + Math.Pow(rgbValues[i * 3 + 1] - kAver[j * 3 + 1], 2) + (责任编辑:qin)