亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? waveletprocessing.cs

?? Image Fusion Techniues
?? CS
?? 第 1 頁 / 共 2 頁
字號:
// 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'.///* WaveletProcessing.cs * * A lot of this code is based on the excellent Matlab code by * Shihua Cai, Keyong Li, Farras Abdelnour and Professor Ivan Selesnick, which * is available at * http://taco.poly.edu/WaveletSoftware/index.html * * Thank you very much for this work, without which this program would not * have been possible. */using System;public classWaveletProcessing : ICloneable{	public object Clone ()	{		return (new WaveletProcessing ());	}	public void Convolve1d (IWavelet wave, ref double[] inVal,		ref double[] outTrend, ref double[] outFluctuation)	{		SimpleArray saIn = new SimpleArray (inVal);		SimpleArray saTrend = new SimpleArray (outTrend);		SimpleArray saFluctuation = new SimpleArray (outFluctuation);		Convolve (wave, saIn, saTrend, saFluctuation);	}	private void ConvolveAFBWorking (IWavelet wave, IWaveletArray inVal,		IWaveletArray outTrend, IWaveletArray outFluctuation)	{		double[] loFilt = wave.ScalingNumbersAnalysis;		double[] hiFilt = wave.WaveletNumbersAnalysis;		int valClen = loFilt.Length + inVal.Length - 1;		double[] trend = new double[valClen];		double[] fluct = new double[valClen];		int N = inVal.Length;		int L = loFilt.Length / 2;		for (int k = 0 ; k < valClen ; ++k) {			for (int j = 0 ; j < loFilt.Length ; ++j) {				int vIdx = k - j;				if (vIdx < 0 || vIdx >= inVal.Length)					continue;				trend[k] += loFilt[j] * inVal[vIdx];				fluct[k] += hiFilt[j] * inVal[vIdx];			}		}		// Debug output		foreach (double val in trend)			Console.WriteLine ("trend: {0}", val);		Console.WriteLine ("");		foreach (double val in fluct)			Console.WriteLine ("fluct: {0}", val);	}	// Convolution	//	// Preconditions:	// inVal.Length % 2 == 0	// wave.SupportSize >= inVal.Length	// outTrend.Length == outFluctuation.Length == inVal.Length / 2	//	private void Convolve (IWavelet wave, IWaveletArray inVal,		IWaveletArray outTrend, IWaveletArray outFluctuation)	{		/*Console.WriteLine ("Convolve (\"{0}\", inVal[{1}], ..)",			wave.Name, inVal.Length);*/		double[] loFilt = wave.ScalingNumbersAnalysis;		double[] hiFilt = wave.WaveletNumbersAnalysis;		ConvolveArr (loFilt, hiFilt, inVal, outTrend, outFluctuation);	}	private void ConvolveArr (double[] loFilt, double[] hiFilt,		IWaveletArray inVal,		IWaveletArray outTrend, IWaveletArray outFluctuation)	{		int valClen = loFilt.Length + inVal.Length - 1;		int N = inVal.Length;		int L = loFilt.Length / 2;		int ON = N / 2;		for (int k = 0 ; k < ((valClen + 1) / 2) ; ++k) {			for (int j = 0 ; j < loFilt.Length ; ++j) {				int vIdx = 2*k - j;				if (vIdx < 0 || vIdx >= inVal.Length)					continue;				vIdx += L;				vIdx %= inVal.Length;				if (k >= N)					continue;				outTrend[k % ON] += loFilt[j] * inVal[vIdx];				outFluctuation[k % ON] += hiFilt[j] * inVal[vIdx];			}		}	}	public void Convolve2d (IWavelet wave, double[,] inVal,		double[,] outTrend, double[,] outH,		double[,] outD, double[,] outV)	{		Convolve2dArr (wave.ScalingNumbersAnalysis, wave.WaveletNumbersAnalysis,			wave.ScalingNumbersAnalysis, wave.WaveletNumbersAnalysis,			inVal, outTrend, outH, outD, outV);	}	public void Convolve2dArr (double[] loFiltCol, double[] hiFiltCol,		double[] loFiltRow, double[] hiFiltRow,		double[,] inVal,		double[,] outTrend, double[,] outH,		double[,] outD, double[,] outV)	{		if ((inVal.GetLength (0) % 2) != 0 ||			(inVal.GetLength (1) % 2) != 0)		{			throw (new ArgumentException (String.Format				("Input array has to be of even dimensions, got ({0}x{1}).",				inVal.GetLength (0), inVal.GetLength (1))));		}		double[,] rowTrends =			new double[inVal.GetLength (0), inVal.GetLength (1) / 2];		double[,] rowFlucts =			new double[inVal.GetLength (0), inVal.GetLength (1) / 2];		// From F create T_{Row} and F_{Row}		for (int row = 0 ; row < inVal.GetLength (0) ; ++row) {			ConvolveArr (loFiltCol, hiFiltCol,				new DirectionalArray (DirectionalArray.Direction.Row, inVal, row),				new DirectionalArray (DirectionalArray.Direction.Row, rowTrends, row),				new DirectionalArray (DirectionalArray.Direction.Row, rowFlucts, row));		}		// From T_{Row} create H and A (Trend)		for (int col = 0 ; col < rowTrends.GetLength (1) ; ++col) {			ConvolveArr (loFiltRow, hiFiltRow,				new DirectionalArray (DirectionalArray.Direction.Column, rowTrends, col),				new DirectionalArray (DirectionalArray.Direction.Column, outTrend, col),				new DirectionalArray (DirectionalArray.Direction.Column, outH, col));		}		// From F_{Row} create V and D		for (int col = 0 ; col < rowFlucts.GetLength (1) ; ++col) {			ConvolveArr (loFiltRow, hiFiltRow,				new DirectionalArray (DirectionalArray.Direction.Column, rowFlucts, col),				new DirectionalArray (DirectionalArray.Direction.Column, outV, col),				new DirectionalArray (DirectionalArray.Direction.Column, outD, col));		}	}	//	// 2D DT Complex Discrete Wavelet Transform	//	// Returns two trees, each which hold 3 complex subbands per level plus	// the trend signal. That are six real signals per level.	//	// The returned array 'dt' has the following structure:	//	// dt[0] holds the first 3 subband directions	// dt[1] holds the second 3 subband directions	//	// dt[0][0-2] are the three the ComplexArray H, D, V bands of plane 1	// dt[1][0-2] are the other three the ComplexArray H, D, V bands of	//   plane 2	// dt[0].GetTrend (0/1) gets the first or second trend (lowpass subband)	//   signals of plane 1	// dt[1].GetTrend (0/1) gets the first or second trend (lowpass subband)	//   signals of plane 2	public Dualtree2dComplex[] DualtreeTransform2dComplex (IWaveletDTCW wave1rst,		IWaveletDTCW wave, double[,] inVal, int scale)	{		Dualtree2dComplex[] trees = new Dualtree2dComplex[2];		Dualtree2dReal[] treesReal = new Dualtree2dReal[2];		// Orientation index t2		for (int t2 = 0 ; t2 < 2 ; ++t2) {			// Real/imaginary index t1			for (int t1 = 0 ; t1 < 2 ; ++t1) {				/*Console.WriteLine ("DualtreeTansform2dComplex: creating real tree ({0}, {1})",					t1 == 0 ? "Real" : "Imaginary", t2 == 0 ? "Orientation 1" : "Orientation 2");*/				treesReal[t1] = DualtreeTransform2dRealSingleTree (wave1rst,					wave, inVal, scale, t1, t2);			}			trees[t2] = new Dualtree2dComplex (treesReal[0], treesReal[1]);		}		// Now trees[0] is 1 orientation, trees[1] is 2 orientation, each		// holding 3 subbands.		Dualtree2dComplex tree1 = trees[0];		Dualtree2dComplex tree2 = trees[1];		while (tree1 != null) {			for (int m = 0 ; m <= 2 ; ++m) {				DualtreeTransform2dComplexSubtract (tree1[m], 0, tree2[m], 1);				DualtreeTransform2dComplexSubtract (tree2[m], 0, tree1[m], 1);			}			tree1 = tree1.Next;			tree2 = tree2.Next;		}		return (trees);	}	private void DualtreeTransform2dComplexSubtract		(Dualtree2dComplex.ComplexArray c1, int ri1,		Dualtree2dComplex.ComplexArray c2, int ri2)	{		/*Console.WriteLine ("DualtreeTransform2dComplexSubtract (c1, {0}, c2, {1})",			ri1, ri2);*/		double sqrt2 = Math.Sqrt (2.0);		for (int y = 0 ; y < c1.GetLength (0) ; ++y) {			for (int x = 0 ; x < c1.GetLength (1) ; ++x) {				double u = (c1[y, x, ri1] + c2[y, x, ri2]) / sqrt2;				c2[y, x, ri2] = (c1[y, x, ri1] - c2[y, x, ri2]) / sqrt2;				c1[y, x, ri1] = u;			}		}	}	// Complex 2d DT INVERSION	// Warning: this changes the original data stored in the tree.	//	public double[,] DualtreeTransform2dComplexInverse (IWaveletDTCW wave1rst,		IWaveletDTCW wave, Dualtree2dComplex[] trees)	{		Dualtree2dComplex tree1 = trees[0];		Dualtree2dComplex tree2 = trees[1];		while (tree1 != null) {			for (int m = 0 ; m <= 2 ; ++m) {				DualtreeTransform2dComplexSubtract (tree1[m], 0, tree2[m], 1);				DualtreeTransform2dComplexSubtract (tree2[m], 0, tree1[m], 1);			}			tree1 = tree1.Next;			tree2 = tree2.Next;		}		// The magic output array.		double[,] result = new double[trees[0].GetTrend (0).GetLength (0) * 2,			trees[0].GetTrend (0).GetLength (1) * 2];		// Orientation index t2 (tree index)		for (int t2 = 0 ; t2 < 2 ; ++t2) {			// Real/imaginary index t1			for (int t1 = 0 ; t1 < 2 ; ++t1) {				double[,] trend = DualtreeTransform2dRealInverseSingleTree					(wave1rst, wave, trees[t2].ProduceRealDualtree (t1),					t1, t2, true);				for (int y = 0 ; y < trend.GetLength (0) ; ++y)					for (int x = 0 ; x < trend.GetLength (1) ; ++x)						result[y, x] += trend[y, x];			}		}		for (int y = 0 ; y < result.GetLength (0) ; ++y)			for (int x = 0 ; x < result.GetLength (1) ; ++x)				result[y, x] /= 4.0;		return (result);	}	//	// 2D DT Real Discrete Wavelet Transform	//	public Dualtree2dReal[] DualtreeTransform2dReal (IWaveletDTCW wave1rst,		IWaveletDTCW wave, double[,] inVal, int scale)	{		Dualtree2dReal[] trees = new Dualtree2dReal[2];		for (int t = 0 ; t < 2 ; ++t)			trees[t] = DualtreeTransform2dRealSingleTree (wave1rst,				wave, inVal, scale, t);		// Do the final add/subtraction and normalization step for each		// fluctuation subsignal		Dualtree2dReal tree1 = trees[0];		Dualtree2dReal tree2 = trees[1];		while (tree1 != null) {			for (int m = 1 ; m <= 3 ; ++m)				DualtreeTransform2dSubtract ((double[,]) tree1[m],					(double[,]) tree2[m]);			tree1 = tree1.Next;			tree2 = tree2.Next;		}		return (trees);	}	private void DualtreeTransform2dSubtract (double[,] s1,		double[,] s2)	{		double sqrt2 = Math.Sqrt (2.0);		for (int y = 0 ; y < s1.GetLength (0) ; ++y) {			for (int x = 0 ; x < s1.GetLength (1) ; ++x) {				double u = (s1[y,x] + s2[y,x]) / sqrt2;				s2[y,x] = (s1[y,x] - s2[y,x]) / sqrt2;				s1[y,x] = u;			}		}	}	private Dualtree2dReal DualtreeTransform2dRealSingleTree (IWaveletDTCW wave1rst,		IWaveletDTCW wave, double[,] inVal, int scale, int tree)	{		return (DualtreeTransform2dRealSingleTree (wave1rst, wave, inVal,			scale, tree, tree));	}	private Dualtree2dReal DualtreeTransform2dRealSingleTree (IWaveletDTCW wave1rst,		IWaveletDTCW wave, double[,] inVal, int scale, int t1, int t2)	{		Dualtree2dReal root = DualtreeTransform2dRealSub (wave1rst, t1, t2, inVal);		Dualtree2dReal walk = root;		for (int k = 1 ; k < scale ; ++k) {			double[,] trend = (double[,]) walk[0];			Dualtree2dReal subtree = DualtreeTransform2dRealSub (wave, t1, t2,				trend);			walk.Next = subtree;			walk = subtree;		}		walk.LastLevel = true;		return (root);	}	private Dualtree2dReal DualtreeTransform2dRealSub (IWaveletDTCW wave,		int t1, int t2, double[,] inVal)	{		Dualtree2dReal dt = new Dualtree2dReal ();		int yDim = inVal.GetLength (0) / 2;		int xDim = inVal.GetLength (1) / 2;		double[,] trend = new double[yDim, xDim];		double[,] H = new double[yDim, xDim];		double[,] D = new double[yDim, xDim];		double[,] V = new double[yDim, xDim];		Convolve2dArr (wave[FilterType.Analysis, t1, PassType.Trend],			wave[FilterType.Analysis, t1, PassType.Fluctuation],			wave[FilterType.Analysis, t2, PassType.Trend],			wave[FilterType.Analysis, t2, PassType.Fluctuation],			inVal, trend, H, D, V);		dt[0] = trend;		dt[2] = H;		dt[3] = D;		dt[1] = V;		return (dt);	}	// Warning: this changes the original data stored in the tree.	public double[,] DualtreeTransform2dRealInverse (IWaveletDTCW wave1rst,		IWaveletDTCW wave, Dualtree2dReal[] trees)	{		// Sum and difference (why?)		Dualtree2dReal tree1 = trees[0];		Dualtree2dReal tree2 = trees[1];		while (tree1 != null) {			for (int m = 1 ; m <= 3 ; ++m)				DualtreeTransform2dSubtract ((double[,]) tree1[m],					(double[,]) tree2[m]);			tree1 = tree1.Next;			tree2 = tree2.Next;		}		double[][,] outTrends = new double[2][,];		for (int n = 0 ; n < 2 ; ++n)			outTrends[n] = DualtreeTransform2dRealInverseSingleTree				(wave1rst, wave, trees[n], n);		double[,] outData = new double[outTrends[0].GetLength (0),			outTrends[0].GetLength (1)];		for (int y = 0 ; y < outTrends[0].GetLength (0) ; ++y) {			for (int x = 0 ; x < outTrends[0].GetLength (1) ; ++x) {				outData[y, x] = (outTrends[0][y, x] +					outTrends[1][y, x]) / 2.0; // FIXME: Farras uses sqrt(2.0) here, why?			}		}		return (outData);	}	private double[,] DualtreeTransform2dRealInverseSingleTree		(IWaveletDTCW wave1rst, IWaveletDTCW wave, Dualtree2dReal root,		int tree)	{		return (DualtreeTransform2dRealInverseSingleTree (wave1rst, wave,			root, tree, true));	}	private double[,] DualtreeTransform2dRealInverseSingleTree		(IWaveletDTCW wave1rst, IWaveletDTCW wave, Dualtree2dReal root,		int tree, bool first)	{		return (DualtreeTransform2dRealInverseSingleTree (wave1rst, wave,			root, tree, tree, first));	}	private double[,] DualtreeTransform2dRealInverseSingleTree		(IWaveletDTCW wave1rst, IWaveletDTCW wave, Dualtree2dReal root,		int t1, int t2, bool first)	{		/*Console.WriteLine ("DualtreeTransform2dRealInverseSingleTree (tree {0}|{1}, first {2})",			t1, t2, first);*/		double[,] subTrend;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产**成人网毛片九色| 欧美自拍丝袜亚洲| 亚洲成人一区二区| 久久久久久久久久电影| 欧美理论在线播放| 99麻豆久久久国产精品免费| 韩国理伦片一区二区三区在线播放| 夜夜爽夜夜爽精品视频| 久久久精品欧美丰满| 91精品国产综合久久香蕉的特点 | 亚洲人吸女人奶水| 99久久精品国产导航| 日韩福利电影在线| 综合激情成人伊人| 久久综合丝袜日本网| 欧美久久一二区| 一本到三区不卡视频| 国产suv精品一区二区6| 精品综合免费视频观看| 亚洲成在人线免费| 夜夜嗨av一区二区三区网页| 国产精品色一区二区三区| 久久亚洲捆绑美女| 欧美成人精精品一区二区频| 欧美精品777| 欧美日韩综合在线免费观看| 色婷婷激情综合| 国产丶欧美丶日本不卡视频| 偷拍亚洲欧洲综合| 亚洲欧美精品午睡沙发| 中文字幕精品一区二区精品绿巨人| 精品久久人人做人人爱| 日韩视频不卡中文| 911精品国产一区二区在线| 欧美三级在线视频| 91成人免费网站| 99re免费视频精品全部| av一本久道久久综合久久鬼色| 国产高清久久久| 国产精品一区2区| 国产一区二区三区电影在线观看| 久久99国产精品久久99果冻传媒| 日韩1区2区3区| 日韩电影在线一区| 久久精品国产亚洲5555| 久久国产生活片100| 精品综合免费视频观看| 国产精品综合视频| 成人sese在线| 91国产福利在线| 欧美美女一区二区三区| 亚洲va在线va天堂| 日韩专区中文字幕一区二区| 日韩国产高清影视| 国产一区二区不卡在线| 国产激情一区二区三区四区| 成人晚上爱看视频| 91丨九色丨蝌蚪丨老版| 欧美性色黄大片手机版| 欧美久久久久久蜜桃| 精品少妇一区二区三区日产乱码| 久久久亚洲精华液精华液精华液| 欧美—级在线免费片| 亚洲另类色综合网站| 日韩精品色哟哟| 国产露脸91国语对白| av中文字幕亚洲| 欧美午夜宅男影院| 精品久久五月天| 中文字幕一区二区三中文字幕| 亚洲成av人综合在线观看| 理论电影国产精品| 成人午夜精品在线| 欧美日本韩国一区二区三区视频| 日韩美女视频在线| 国产精品久久一卡二卡| 爽好久久久欧美精品| 国产乱一区二区| 欧洲另类一二三四区| 久久网站最新地址| 亚洲一区在线免费观看| 狠狠狠色丁香婷婷综合激情| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美日韩亚洲国产综合| 日韩免费视频线观看| 亚洲欧洲国产专区| 奇米色777欧美一区二区| 粉嫩欧美一区二区三区高清影视| 欧美日韩成人一区| 国产精品国产三级国产三级人妇| 日韩av一级片| 91麻豆国产在线观看| 欧美va亚洲va| 亚洲已满18点击进入久久| 国产精品91一区二区| 欧美精品日韩一区| 成人欧美一区二区三区小说| 紧缚捆绑精品一区二区| 欧美日韩视频在线观看一区二区三区| 久久久国产精品麻豆| 日本午夜精品视频在线观看| 94-欧美-setu| 国产亚洲欧美激情| 日韩高清一区二区| 91激情五月电影| 国产精品免费视频观看| 开心九九激情九九欧美日韩精美视频电影| 91美女片黄在线| 国产色一区二区| 久久电影国产免费久久电影| 欧美日韩高清一区| 亚洲男同1069视频| 成人av资源网站| 久久久久99精品一区| 毛片不卡一区二区| 欧美日韩一区高清| 夜夜精品视频一区二区| 色诱视频网站一区| 国产精品热久久久久夜色精品三区| 欧美放荡的少妇| 亚洲精品视频在线| 99re免费视频精品全部| 国产精品伦一区| 国产99久久久国产精品免费看| 日韩你懂的在线观看| 奇米影视在线99精品| 91精品国产综合久久精品图片| 午夜精品久久久久久久| 欧美日韩一区成人| 五月激情综合网| 欧美日韩一二区| 天天综合天天综合色| 7777精品伊人久久久大香线蕉的 | 香蕉久久一区二区不卡无毒影院| 色猫猫国产区一区二在线视频| 亚洲欧洲国产日本综合| 99久免费精品视频在线观看 | 日韩高清一区在线| 欧美一区二视频| 美女视频免费一区| 精品久久久久久无| 国产一级精品在线| 久久久久久久久久电影| 懂色av一区二区三区免费看| 亚洲国产精品v| gogo大胆日本视频一区| 亚洲四区在线观看| 色8久久精品久久久久久蜜| 亚洲男人的天堂在线观看| 欧美在线综合视频| 午夜精品久久久| 精品美女被调教视频大全网站| 国产精品一区二区x88av| 国产精品情趣视频| 色综合天天性综合| 亚洲成人黄色影院| 欧美成人在线直播| 福利电影一区二区| 亚洲激情中文1区| 欧美精选一区二区| 国产精品一色哟哟哟| 亚洲欧美另类久久久精品2019| 欧美日本在线看| 国产高清精品网站| 亚洲免费在线看| 欧美一级一级性生活免费录像| 国产麻豆视频精品| 最新国产精品久久精品| 欧美片网站yy| 国产精品77777竹菊影视小说| 亚洲色欲色欲www| 91精品国产综合久久精品图片 | 免费人成黄页网站在线一区二区 | 亚洲国产成人一区二区三区| 91色|porny| 麻豆国产一区二区| 国产精品久线观看视频| 91精品国模一区二区三区| 懂色av一区二区三区免费看| 偷拍与自拍一区| 国产精品美女久久久久av爽李琼| 欧美影院精品一区| 国产精品中文欧美| 亚洲www啪成人一区二区麻豆| 国产欧美一区二区三区在线看蜜臀 | 欧美私模裸体表演在线观看| 韩日欧美一区二区三区| 亚洲一区免费视频| 国产欧美日韩另类视频免费观看| 欧洲中文字幕精品| 国产91精品一区二区麻豆亚洲| 日韩中文字幕1| 中文字幕一区二区日韩精品绯色| 欧美本精品男人aⅴ天堂| 色婷婷亚洲一区二区三区| 国产精品一级片| 奇米影视在线99精品| 亚洲国产日韩a在线播放性色| 国产精品毛片久久久久久久| 欧美一区二区人人喊爽|