資源簡介
本資源為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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????34816??2008-07-28?14:18??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\dpcm.vsd
?????文件????1440054??2008-07-28?10:01??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\LZW解碼.bmp
?????文件?????247686??2008-07-28?09:57??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\LZW運算對話框.bmp
?????文件??????56320??2008-08-29?20:58??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\Thumbs.db
?????文件?????328854??2008-07-30?09:30??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\傅里葉變換編碼對話框.bmp
?????文件????1440054??2008-07-30?11:12??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\傅里葉變換編碼結果.bmp
?????文件????1766150??2008-07-22?14:50??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\哈夫曼編碼.bmp
?????文件?????319854??2008-07-30?16:45??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\小波變換對話框.bmp
?????文件????1440054??2008-07-30?16:46??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\小波變換結果.bmp
?????文件????1440054??2008-07-25?14:59??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\行程解碼.bmp
?????文件?????247686??2008-07-25?14:41??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\行程運算對話框.bmp
?????文件?????225150??2008-08-27?21:20??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\預測編碼對話框.bmp
?????文件????1440054??2008-07-28?21:54??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\預測解碼結果.bmp
?????文件????1690470??2008-07-23?22:22??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\香農-弗諾編碼.bmp
?????文件????1596054??2008-07-23?22:25??[C#數字圖像處理算法典型實例].(隨書光盤)\image\10\香農編碼.bmp
?????文件?????591294??2008-08-08?19:38??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\HSI空間分量對話框.bmp
?????文件????1440054??2008-08-08?19:40??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\HSI空間分量調整結果.bmp
?????文件?????591294??2008-08-08?19:32??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\RGB空間分量對話框.bmp
?????文件????1440054??2008-08-08?19:34??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\RGB空間分量調整結果.bmp
?????文件??????81920??2008-08-30?10:45??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\Thumbs.db
?????文件??????49152??2008-08-05?16:29??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\傳遞函數.vsd
?????文件?????300294??2008-08-06?08:48??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\偽彩色處理對話框.bmp
?????文件?????284646??2008-08-10?12:41??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\平滑處理對話框.bmp
?????文件????1440054??2008-08-10?12:43??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\平滑處理結果.bmp
?????文件????1440054??2008-08-29?20:58??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\強度分層法.bmp
?????文件?????147318??2008-08-13?18:33??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\彩色圖像分割對話框.bmp
?????文件????1440054??2008-08-13?18:37??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\彩色圖像分割結果.bmp
?????文件?????249478??2008-08-13?10:50??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\彩色圖像邊緣檢測對話框.bmp
?????文件????1440054??2008-08-30?10:38??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\彩色圖像邊緣檢測結果.bmp
?????文件?????272214??2008-07-31?21:17??[C#數字圖像處理算法典型實例].(隨書光盤)\image\11\彩色空間對話框.bmp
............此處省略650個文件信息
評論
共有 條評論