资源简介

花了我50个c币,真狠呐,我下载下来以后自己从新编译了下,原项目是vs2005的,我用vs2015编译的,代码可用。记得项目属性要设置为允许执行不安全代码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;

namespace ImageProcessing
{
    public partial class Form_Main : Form
    {
        public Form_Main()
        {
            InitializeComponent();

            Initialize();
        }

        private bool sourceAvailable;

        private void Initialize()
        {
            sourceAvailable = false;

            openFileDialog_LoadImage.Filter = “*.png*.jpg|*.png;*.jpg;*.jpeg“;
            openFileDialog_LoadImage.FilterIndex = 1;
            openFileDialog_LoadImage.RestoreDirectory = true;
        }

        private void button_LoadImage_Click(object sender EventArgs e)
        {
            if (openFileDialog_LoadImage.ShowDialog() == DialogResult.OK)
            {
                string fileName = openFileDialog_LoadImage.FileName;
                pictureBox_SourceImage.Image = Image.FromFile(fileName);

                sourceAvailable = true;
            }
        }

        private void button_Mean_Click(object sender EventArgs e)
        {
            if (!sourceAvailable)
            {
                MessageBox.Show(“Please load source image first!“);
                return;
            }

            Bitmap sourceImage = new Bitmap(pictureBox_SourceImage.Image);
            FormatImage(ref sourceImage);

            kernel = new int[] { { 1 1 1 } { 1 1 1 } { 1 1 1 } };
            Bitmap destImage = getTargetImage(sourceImage false);

            pictureBox_ConvertedImage.Image = destImage;

        }

        private void button_Edges_Click(object sender EventArgs e)
        {
            if (!sourceAvailable)
            {
                MessageBox.Show(“Please load source image first!“);
                return;
            }

            Bitmap sourceImage = new Bitmap(pictureBox_SourceImage.Image);
            FormatImage(ref sourceImage);

            kernel = new int[] { { 0 -1 0 } { -1 4 -1 } { 0 -1 0 } };
            Bitmap destImage = getTargetImage(sourceImage false);

            pictureBox_ConvertedImage.Image = destImage;
        }

        private void button_Sharpen_Click(object sender EventArgs e)
        {
            if (!sourceAvailable)
            {
                MessageBox.Show(“Please load source image first!“);
                return;
            }

            Bitmap sourceImage = new Bitmap(pictureBox_SourceImage.Image);
            FormatImage(ref sourceImage);

            kernel = new int[] { { 0 -1 0 } { -1 5 -1 } { 0 -1 0 } };
            Bitmap destImage = getTargetImage(sourceImage false);

            pictureBox_ConvertedImage.Image = destImage;
        }

        private void button_Med_Click(object sender EventArgs e)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-29 11:40  image processing\
     目录           0  2009-06-13 23:51  image processing\image processing\
     目录           0  2009-06-13 23:53  image processing\image processing\images\
     文件       66614  2007-06-08 14:06  image processing\image processing\images\Barbara256.bmp
     文件      263222  2007-06-02 20:53  image processing\image processing\images\Barbara512.bmp
     文件      263224  2009-04-12 22:01  image processing\image processing\images\lena.bmp
     文件       66614  2007-06-02 11:55  image processing\image processing\images\lena256.bmp
     文件      263222  2007-06-02 20:56  image processing\image processing\images\Lena512.bmp
     文件       66614  2007-06-02 21:01  image processing\image processing\images\peppers256.bmp
     文件      263222  2007-06-02 20:55  image processing\image processing\images\Peppers512.bmp
     目录           0  2009-06-13 23:53  image processing\image processing\release\
     文件       24576  2009-06-13 23:54  image processing\image processing\release\ImageProcessing.exe
     文件       30208  2009-06-13 23:54  image processing\image processing\release\ImageProcessing.pdb
     文件        5632  2005-12-08 14:51  image processing\image processing\release\ImageProcessing.vshost.exe
     目录           0  2018-11-29 14:56  image processing\image processing\source code\
     目录           0  2018-11-29 14:56  image processing\image processing\source code\ImageProcessing\
     文件        1012  2018-11-29 11:41  image processing\image processing\source code\ImageProcessing.sln
     文件       19968  2010-04-27 17:21  image processing\image processing\source code\ImageProcessing.suo
     目录           0  2009-06-13 23:51  image processing\image processing\source code\ImageProcessing\bin\
     目录           0  2018-11-29 11:53  image processing\image processing\source code\ImageProcessing\bin\Debug\
     文件       15872  2018-11-29 11:48  image processing\image processing\source code\ImageProcessing\bin\Debug\ImageProcessing.exe
     文件       32256  2018-11-29 11:48  image processing\image processing\source code\ImageProcessing\bin\Debug\ImageProcessing.pdb
     文件       21680  2018-11-29 11:53  image processing\image processing\source code\ImageProcessing\bin\Debug\ImageProcessing.vshost.exe
     文件         490  2018-04-12 07:35  image processing\image processing\source code\ImageProcessing\bin\Debug\ImageProcessing.vshost.exe.manifest
     目录           0  2009-06-13 23:54  image processing\image processing\source code\ImageProcessing\bin\Release\
     文件       24576  2009-06-13 23:54  image processing\image processing\source code\ImageProcessing\bin\Release\ImageProcessing.exe
     文件       30208  2009-06-13 23:54  image processing\image processing\source code\ImageProcessing\bin\Release\ImageProcessing.pdb
     文件        5632  2005-12-08 14:51  image processing\image processing\source code\ImageProcessing\bin\Release\ImageProcessing.vshost.exe
     文件       15970  2018-11-29 14:56  image processing\image processing\source code\ImageProcessing\Form1.cs
     文件        8423  2018-11-29 11:46  image processing\image processing\source code\ImageProcessing\Form1.Designer.cs
     文件        6026  2018-11-29 11:46  image processing\image processing\source code\ImageProcessing\Form1.resx
............此处省略31个文件信息

评论

共有 条评论