⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 farras.cs

📁 Image Fusion Techniues
💻 CS
字号:
// Waveblend - complex dualtree based image fusion// (C) Copyright 2004 -- Sebastian Nowozin <nowozin@cs.tu-berlin.de>//// This file is part of Waveblend.//// Waveblend is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published// by the Free Software Foundation; version 2 of the License.//// Waveblend is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// The license is included with the distribution in the file 'LICENSE'.///* Farras.cs * * Filters for 1d real dwt and dualtree wavelet transforms. Filter values from * the Matlab implementation available at * http://taco.poly.edu/WaveletSoftware/index.html * Thanks! */using System;public classFarras10 : IWavelet{	public string Name {		get {			return ("Farras10");		}	}	static double[] scalingNumbersAnalysis = {		0,		0,		-0.08838834764832,		0.08838834764832,		0.69587998903400,		0.69587998903400,		0.08838834764832,		-0.08838834764832,		0.01122679215254,		0.01122679215254,	};	static double[] scalingNumbersSynthesis = {		0.01122679215254,		0.01122679215254,		-0.08838834764832,		0.08838834764832,		0.69587998903400,		0.69587998903400,		0.08838834764832,		-0.08838834764832,		0,		0,	};	public double[] ScalingNumbersAnalysis {		get {			return (scalingNumbersAnalysis);		}	}	public double[] ScalingNumbersSynthesis {		get {			return (scalingNumbersSynthesis);		}	}	static double[] waveletNumbersAnalysis = {		-0.01122679215254,		0.01122679215254,		0.08838834764832,		0.08838834764832,		-0.69587998903400,		0.69587998903400,		-0.08838834764832,		-0.08838834764832,		0.0,		0.0,	};	static double[] waveletNumbersSynthesis = {		0,		0,		-0.08838834764832,		-0.08838834764832,		0.69587998903400,		-0.69587998903400,		0.08838834764832,		0.08838834764832,		0.01122679215254,		-0.01122679215254,	};	public double[] WaveletNumbersAnalysis {		get {			return (waveletNumbersAnalysis);		}	}	public double[] WaveletNumbersSynthesis {		get {			return (waveletNumbersSynthesis);		}	}	public int SupportSize {		get {			return (10);		}	}}public classFarras10CFirst : IWaveletDTCW{	public string Name {		get {			return ("Farras10CFirst");		}	}	public double[] this [FilterType ft, int tree, PassType hilo]	{		get {			if (ft == FilterType.Analysis && tree == 0 && hilo == PassType.Trend)				return (tree1afTrend);			if (ft == FilterType.Analysis && tree == 0 && hilo == PassType.Fluctuation)				return (tree1afFluctuation);			if (ft == FilterType.Synthesis && tree == 0 && hilo == PassType.Trend)				return (tree1sfTrend);			if (ft == FilterType.Synthesis && tree == 0 && hilo == PassType.Fluctuation)				return (tree1sfFluctuation);			if (ft == FilterType.Analysis && tree == 1 && hilo == PassType.Trend)				return (tree2afTrend);			if (ft == FilterType.Analysis && tree == 1 && hilo == PassType.Fluctuation)				return (tree2afFluctuation);			if (ft == FilterType.Synthesis && tree == 1 && hilo == PassType.Trend)				return (tree2sfTrend);			if (ft == FilterType.Synthesis && tree == 1 && hilo == PassType.Fluctuation)				return (tree2sfFluctuation);			throw (new ArgumentException ("invalid filter requested"));		}	}	// af{1}	static double[] tree1afTrend = {			0,			-0.08838834764832,			0.08838834764832,			0.69587998903400,			0.69587998903400,			0.08838834764832,			-0.08838834764832,			0.01122679215254,			0.01122679215254,			0,	};	static double[] tree1afFluctuation = {			0,			-0.01122679215254,			0.01122679215254,			0.08838834764832,			0.08838834764832,			-0.69587998903400,			0.69587998903400,			-0.08838834764832,			-0.08838834764832,			0,	};	// sf{1}	static double[] tree1sfTrend = {			0,			0.01122679215254,			0.01122679215254,			-0.08838834764832,			0.08838834764832,			0.69587998903400,			0.69587998903400,			0.08838834764832,			-0.08838834764832,			0,	};	static double[] tree1sfFluctuation = {			0,			-0.08838834764832,			-0.08838834764832,			0.69587998903400,			-0.69587998903400,			0.08838834764832,			0.08838834764832,			0.01122679215254,			-0.01122679215254,			0,	};	// af{2}	static double[] tree2afTrend = {			0.01122679215254,			0.01122679215254,			-0.08838834764832,			0.08838834764832,			0.69587998903400,			0.69587998903400,			0.08838834764832,			-0.08838834764832,			0,			0,	};	static double[] tree2afFluctuation = {			0,			0,			-0.08838834764832,			-0.08838834764832,			0.69587998903400,			-0.69587998903400,			0.08838834764832,			0.08838834764832,			0.01122679215254,			-0.01122679215254,	};	static double[] tree2sfTrend = {			0,			0,			-0.08838834764832,			0.08838834764832,			0.69587998903400,			0.69587998903400,			0.08838834764832,			-0.08838834764832,			0.01122679215254,			0.01122679215254,	};	static double[] tree2sfFluctuation = {			-0.01122679215254,			0.01122679215254,			0.08838834764832,			0.08838834764832,			-0.69587998903400,			0.69587998903400,			-0.08838834764832,			-0.08838834764832,			0,			0,	};	public int SupportSize {		get {			return (10);		}	}}public classKingsburyQC10 : IWaveletDTCW{	public string Name {		get {			return ("KingsburyQC10");		}	}	public double[] this [FilterType ft, int tree, PassType hilo]	{		get {			if (ft == FilterType.Analysis && tree == 0 && hilo == PassType.Trend)				return (tree1afTrend);			if (ft == FilterType.Analysis && tree == 0 && hilo == PassType.Fluctuation)				return (tree1afFluctuation);			if (ft == FilterType.Synthesis && tree == 0 && hilo == PassType.Trend)				return (tree1sfTrend);			if (ft == FilterType.Synthesis && tree == 0 && hilo == PassType.Fluctuation)				return (tree1sfFluctuation);			if (ft == FilterType.Analysis && tree == 1 && hilo == PassType.Trend)				return (tree2afTrend);			if (ft == FilterType.Analysis && tree == 1 && hilo == PassType.Fluctuation)				return (tree2afFluctuation);			if (ft == FilterType.Synthesis && tree == 1 && hilo == PassType.Trend)				return (tree2sfTrend);			if (ft == FilterType.Synthesis && tree == 1 && hilo == PassType.Fluctuation)				return (tree2sfFluctuation);			throw (new ArgumentException ("invalid filter requested"));		}	}	// af{1}	static double[] tree1afTrend = {			0.03516384000000,			0,			-0.08832942000000,			0.23389032000000,			0.76027237000000,			0.58751830000000,			0,			-0.11430184000000,			0,			0,	};	static double[] tree1afFluctuation = {			0,			0,			-0.11430184000000,			0,			0.58751830000000,			-0.76027237000000,			0.23389032000000,			0.08832942000000,			0,			-0.03516384000000,	};	// sf{1}	static double[] tree1sfTrend = {			0,			0,			-0.11430184000000,			0,			0.58751830000000,			0.76027237000000,			0.23389032000000,			-0.08832942000000,			0,			0.03516384000000,	};	static double[] tree1sfFluctuation = {			-0.03516384000000,			0,			0.08832942000000,			0.23389032000000,			-0.76027237000000,			0.58751830000000,			0,			-0.11430184000000,			0,			0,	};	// af{2}	static double[] tree2afTrend = {			0,			0,			-0.11430184000000,			0,			0.58751830000000,			0.76027237000000,			0.23389032000000,			-0.08832942000000,			0,			0.03516384000000,	};	static double[] tree2afFluctuation = {			-0.03516384000000,			0,			0.08832942000000,			0.23389032000000,			-0.76027237000000,			0.58751830000000,			0,			-0.11430184000000,			0,			0,	};	static double[] tree2sfTrend = {			0.03516384000000,			0,			-0.08832942000000,			0.23389032000000,			0.76027237000000,			0.58751830000000,			0,			-0.11430184000000,			0,			0,	};	static double[] tree2sfFluctuation = {			0,			0,			-0.11430184000000,			0,			0.58751830000000,			-0.76027237000000,			0.23389032000000,			0.08832942000000,			0,			-0.03516384000000,	};	public int SupportSize {		get {			return (10);		}	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -