资源简介
c#图像噪声平滑处理.赵春江数字图像处理对应程序

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace smooth
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void open_Click(object sender EventArgs e)
{
OpenFileDialog opnDlg = new OpenFileDialog();
opnDlg.Filter = “所有图像文件 | *.bmp; *.pcx; *.png; *.jpg; *.gif;“ +
“*.tif; *.ico; *.dxf; *.cgm; *.cdr; *.wmf; *.eps; *.emf|“ +
“位图( *.bmp; *.jpg; *.png;...) | *.bmp; *.pcx; *.png; *.jpg; *.gif; *.tif; *.ico|“ +
“矢量图( *.wmf; *.eps; *.emf;...) | *.dxf; *.cgm; *.cdr; *.wmf; *.eps; *.emf“;
opnDlg.title = “打开图像文件“;
opnDlg.ShowHelp = true;
if (opnDlg.ShowDialog() == DialogResult.OK)
{
curFileName = opnDlg.FileName;
try
{
curBitmap = (Bitmap)Image.FromFile(curFileName);
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}
}
Invalidate();
}
private void close_Click(object sender EventArgs e)
{
this.Close();
}
private void Form1_Paint(object sender PaintEventArgs e)
{
Graphics g = e.Graphics;
if (curBitmap != null)
{
g.DrawImage(curBitmap 160 20 curBitmap.Width curBitmap.Height);
}
}
private void noise_Click(object sender EventArgs e)
{
if (curBitmap != null)
{
noiseModel noise = new noiseModel();
if (noise.ShowDialog() == DialogResult.OK)
{
Rectangle rect = new Rectangle(0 0 curBitmap.Width curBitmap.Height);
System.Drawing.Imaging.BitmapData bmpData = curBitmap.LockBits(rect System.Drawing.Imaging.ImageLockMode.ReadWrite curBitmap.PixelFormat);
IntPtr ptr = bmpData.Scan0;
int bytes = curBitmap.Width * curBitmap.Height*3;
byte[] grayValues = new byte[bytes];
System.Runtime.InteropServices.Marshal.Copy(ptr grayValues 0 bytes);
double temp = 0;
byte flagNoise = noise.GetFlag;
double[] paraNoise = new double[2];
paraNoise = noise.GetParaN;
Random r1 r2;
double v1 v2;
r1 = new Random(unchecked((int)DateTime.Now.Ticks));
r2 = new Random(~unchecked((int)DateTime.Now.Ticks));
for (int i = 0; i < bytes; i++)
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 60416 2014-10-16 08:41 smooth\smooth\smooth\bin\Debug\smooth.exe
文件 138752 2014-10-16 08:41 smooth\smooth\smooth\bin\Debug\smooth.pdb
文件 11608 2014-10-16 08:42 smooth\smooth\smooth\bin\Debug\smooth.vshost.exe
文件 69268 2014-10-16 08:42 smooth\smooth\smooth\Form1.cs
文件 6571 2008-08-23 14:39 smooth\smooth\smooth\Form1.Designer.cs
文件 5814 2008-08-23 14:39 smooth\smooth\smooth\Form1.resx
文件 745 2008-09-03 22:17 smooth\smooth\smooth\gauss.cs
文件 3714 2008-09-03 22:16 smooth\smooth\smooth\gauss.Designer.cs
文件 5814 2008-08-22 10:32 smooth\smooth\smooth\gauss.resx
文件 879 2008-09-03 21:05 smooth\smooth\smooth\meanMedian.cs
文件 5612 2008-09-03 21:05 smooth\smooth\smooth\meanMedian.Designer.cs
文件 5814 2008-08-22 11:45 smooth\smooth\smooth\meanMedian.resx
文件 11217 2008-08-22 15:42 smooth\smooth\smooth\morphologic.cs
文件 20168 2008-08-22 15:40 smooth\smooth\smooth\morphologic.Designer.cs
文件 5814 2008-08-22 15:40 smooth\smooth\smooth\morphologic.resx
文件 3592 2008-08-22 10:39 smooth\smooth\smooth\noiseModel.cs
文件 13077 2008-08-22 10:32 smooth\smooth\smooth\noiseModel.Designer.cs
文件 5814 2008-08-22 10:32 smooth\smooth\smooth\noiseModel.resx
文件 5718 2014-10-16 08:41 smooth\smooth\smooth\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 2690 2014-10-16 08:42 smooth\smooth\smooth\obj\Debug\smooth.csproj.FileListAbsolute.txt
文件 1341 2014-10-16 08:41 smooth\smooth\smooth\obj\Debug\smooth.csproj.GenerateResource.Cache
文件 60416 2014-10-16 08:41 smooth\smooth\smooth\obj\Debug\smooth.exe
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.Form1.resources
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.gauss.resources
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.meanMedian.resources
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.morphologic.resources
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.noiseModel.resources
文件 138752 2014-10-16 08:41 smooth\smooth\smooth\obj\Debug\smooth.pdb
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.Properties.Resources.resources
文件 180 2014-10-16 08:38 smooth\smooth\smooth\obj\Debug\smooth.stati.resources
............此处省略39个文件信息
- 上一篇:基于ASPNET的三层架构的学生成绩管理系统
- 下一篇:c#银行取号代码
相关资源
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论