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

毕业论文移动版

毕业论文 > 计算机论文 >

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


                        }
                        else if (i == 0)
                            g.DrawLine(Pens.White, 250, 430, 250, 20);
                        else
                        {
                            k = (-1 / Math.Tan(i * Math.PI / 180));
                            b = ((j - 90) * 8 / Math.Sin(i * Math.PI / 180)) *180 / 512;
                            
                            if (b >= 0 && b <= 180)
                            {
                                x1 = 0;
                                y1 = Convert.ToInt16(b);
                                double temp = -b / k;
                                if (temp <= 180 && temp >= 0)
                                {
                                    x2 = Convert.ToInt16(temp);
                                    y2 = 0;
                                }
                                else if (temp >= -180 && temp < 0)
                                {
                                    x2 = Convert.ToInt16((180 - b) / k); (责任编辑:qin)