(五)C#图像处理——灰度直方图

在文章(一)的基础上绘制直方图:
 此时先在原有项目中添加一个新的窗体,并添加相应的控件,其在histForm.Designer.cs中的代码如下:

             //
            // close
            //
            this.close.Location = new System.Drawing.Point(262, 275);
            this.close.Name = "close";
            this.close.Size = new System.Drawing.Size(75, 23);
            this.close.TabIndex = 0;
            this.close.Text = "关 闭";
            this.close.UseVisualStyleBackColor = true;
            this.close.Click += new System.EventHandler(this.close_Click);
            //
            // histForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(339, 302);
            this.ControlBox = false;
            this.Controls.Add(this.close);
            this.Name = "histForm";
            this.Text = "直方图";
            this.Load += new System.EventHandler(this.histForm_Load);
            this.Paint += new System.Windows.Forms.PaintEventHandler(this.histForm_Paint);
            this.ResumeLayout(false);

在Form1窗体上添加按钮控件,用于打开histForm窗体,其属性在Form1.Designer.cs中代码如下所示:

            //
            // histogram
            //

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值