Ejemplo n.º 1
0
        private void 傅里叶平均值ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            checkPictureBox1();
            if (!valid)
            {
                return;
            }

            Bitmap bit = new Bitmap(pictureBox1.Image);

            bit = scale2SquareSize(bit);
            pictureBox2.Refresh();

            Bitmap graybit = GraphicClass.convertRGB2Gray(bit);
            int    width   = graybit.Width;
            int    height  = graybit.Height;

            label5.Text = width.ToString() + " × " + height.ToString();
            label6.Text = GraphicClass.aveValue(bit, GraphicClass.fft2d(bit, false)).ToString();

            pictureBox2.Image = GraphicClass.complex2Gray(GraphicClass.fft2d(bit, true), width, height);

            // 跳到对应信息显示区域
            tabControl1.SelectedIndex = 1;
        }