• 大小: 1019KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-03
  • 语言: C#
  • 标签:

资源简介

最新c#图像处理源代码(包含边缘检测,灰度,霍夫等各种变换等各种算法源代码实例。。。)对初学和已有研究者都很有帮助,值得收藏。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;

namespace compression
{
    class Complex
    {
        private double real = 0.0;
        private double imaginary = 0.0;

        public double Real
        {
            get
            {
                return real;
            }
            set
            {
                real = value;
            }
        }

        public double Imaginary
        {
            get
            {
                return imaginary;
            }
            set
            {
                imaginary = value;
            }
        }

        public Complex()
        {
        }

        public Complex(double dbreal double dbimag)
        {
            real = dbreal;
            imaginary = dbimag;
        }

        public Complex(Complex other)
        {
            real = other.real;
            imaginary = other.imaginary;
        }

        public static Complex operator +(Complex comp1 Complex comp2)
        {
            return comp1.Add(comp2);
        }

        public static Complex operator -(Complex comp1 Complex comp2)
        {
            return comp1.Subtract(comp2);
        }

        public static Complex operator *(Complex comp1 Complex comp2)
        {
            return comp1.Multiply(comp2);
        }

        public Complex Add(Complex comp)
        {
            double x = real + comp.real;
            double y = imaginary + comp.imaginary;

            return new Complex(x y);
        }

        public Complex Subtract(Complex comp)
        {
            double x = real - comp.real;
            double y = imaginary - comp.imaginary;

            return new Complex(x y);
        }

        public Complex Multiply(Complex comp)
        {
            double x = real * comp.real - imaginary * comp.imaginary;
            double y = real * comp.imaginary + imaginary * comp.real;

            return new Complex(x y);
        }

        public double Abs()
        {
            double x = Math.Abs(real);
            double y = Math.Abs(imaginary);

            if (real == 0)
            {
                return y;
            }
            if (imaginary == 0)
            {
                return x;
            }

            if (x > y)
            {
                return (x * Math.Sqrt(1 + (y / x) * (y / x)));
            }
            else
            {
                return (y * Math.Sqrt(1 + (x / y) * (x / y)));
            }
        }

        public double Angle()
        {
            if (real == 0 && imaginary == 0)
                return 0;

            if (real == 0)
            {
                if (imaginary > 0)
                    return Math.PI / 2;
                else
                    return -Math.PI / 2;
            }
            else
            {
                if (real > 0)
                    return Math.Atan2(imag

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      65536  2008-09-05 18:22  c#图像处理大全\10\compression\compression\bin\Debug\compression.exe

     文件     161280  2008-09-05 18:22  c#图像处理大全\10\compression\compression\bin\Debug\compression.pdb

     文件       5632  2005-12-08 22:51  c#图像处理大全\10\compression\compression\bin\Debug\compression.vshost.exe

     文件       3444  2008-07-30 16:07  c#图像处理大全\10\compression\compression\Complex.cs

     文件       6129  2008-07-30 22:35  c#图像处理大全\10\compression\compression\compression.csproj

     文件       1605  2008-08-26 06:39  c#图像处理大全\10\compression\compression\dpcmCode.cs

     文件       6212  2008-07-29 02:46  c#图像处理大全\10\compression\compression\dpcmCode.Designer.cs

     文件       5814  2008-07-29 02:46  c#图像处理大全\10\compression\compression\dpcmCode.resx

     文件      63887  2008-09-05 18:22  c#图像处理大全\10\compression\compression\Form1.cs

     文件       7704  2008-07-30 23:01  c#图像处理大全\10\compression\compression\Form1.Designer.cs

     文件       5814  2008-07-30 23:01  c#图像处理大全\10\compression\compression\Form1.resx

     文件       5346  2008-07-22 21:52  c#图像处理大全\10\compression\compression\huffmanCode.cs

     文件       6572  2008-07-22 21:32  c#图像处理大全\10\compression\compression\huffmanCode.Designer.cs

     文件       5814  2008-07-22 21:32  c#图像处理大全\10\compression\compression\huffmanCode.resx

     文件        737  2008-09-05 02:17  c#图像处理大全\10\compression\compression\lzwCode.cs

     文件       4723  2008-09-05 02:17  c#图像处理大全\10\compression\compression\lzwCode.Designer.cs

     文件       5814  2008-07-28 04:07  c#图像处理大全\10\compression\compression\lzwCode.resx

     文件       3372  2008-09-05 18:22  c#图像处理大全\10\compression\compression\obj\compression.csproj.FileListAbsolute.txt

     文件       1396  2008-07-30 23:01  c#图像处理大全\10\compression\compression\obj\Debug\compression.csproj.GenerateResource.Cache

     文件        180  2008-07-29 02:46  c#图像处理大全\10\compression\compression\obj\Debug\compression.dpcmCode.resources

     文件      65536  2008-09-05 18:22  c#图像处理大全\10\compression\compression\obj\Debug\compression.exe

     文件        180  2008-07-30 23:01  c#图像处理大全\10\compression\compression\obj\Debug\compression.Form1.resources

     文件        180  2008-07-22 21:46  c#图像处理大全\10\compression\compression\obj\Debug\compression.huffmanCode.resources

     文件        180  2008-07-28 04:07  c#图像处理大全\10\compression\compression\obj\Debug\compression.lzwCode.resources

     文件     161280  2008-09-05 18:22  c#图像处理大全\10\compression\compression\obj\Debug\compression.pdb

     文件        180  2008-07-22 00:58  c#图像处理大全\10\compression\compression\obj\Debug\compression.Properties.Resources.resources

     文件        180  2008-07-25 17:11  c#图像处理大全\10\compression\compression\obj\Debug\compression.rleCode.resources

     文件        180  2008-07-23 17:46  c#图像处理大全\10\compression\compression\obj\Debug\compression.shannonC.resources

     文件        180  2008-07-23 06:08  c#图像处理大全\10\compression\compression\obj\Debug\compression.shannonFannon.resources

     文件        180  2008-07-30 05:11  c#图像处理大全\10\compression\compression\obj\Debug\compression.transCode.resources

............此处省略482个文件信息

评论

共有 条评论