亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
26uuu亚洲综合色欧美| 国产人妖乱国产精品人妖| 国产乱人伦偷精品视频不卡| 亚洲色图一区二区| 日韩女优av电影在线观看| 99久久777色| 国产久卡久卡久卡久卡视频精品| 亚洲综合一二三区| 中文字幕一区二区三区不卡在线 | 国产精品久久久久永久免费观看 | 精品噜噜噜噜久久久久久久久试看| av在线不卡电影| 国内精品嫩模私拍在线| 日韩电影免费在线观看网站| 亚洲色图制服丝袜| 国产精品人妖ts系列视频 | 一区二区三区四区不卡视频| www国产成人| 日本丰满少妇一区二区三区| 国产一区二区三区免费| 亚洲一区二区精品视频| 国产欧美一区二区精品久导航| 欧美性猛片aaaaaaa做受| 国产黑丝在线一区二区三区| 日韩精品乱码av一区二区| 中文字幕一区二区在线播放| 日韩视频一区在线观看| 在线观看国产91| 国产999精品久久| 美女视频黄久久| 一区二区欧美国产| 国产校园另类小说区| 日韩一级在线观看| 欧美视频在线一区| 91猫先生在线| 北条麻妃国产九九精品视频| 国产麻豆精品视频| 奇米色一区二区| 五月激情丁香一区二区三区| 亚洲人成网站在线| 国产精品成人在线观看| 欧美日韩在线直播| 91色视频在线| 成人久久视频在线观看| 国产精品一区二区三区乱码| 美女一区二区三区| 免费人成精品欧美精品| 五月天丁香久久| 亚洲午夜一二三区视频| 亚洲精品国产高清久久伦理二区| 中文字幕的久久| 欧美激情综合五月色丁香| 久久午夜电影网| 久久久影院官网| 久久久精品影视| 久久毛片高清国产| 国产无人区一区二区三区| 夜夜精品视频一区二区| 自拍偷拍亚洲综合| 一区二区中文视频| 亚洲蜜臀av乱码久久精品| 国产精品国产三级国产aⅴ入口| 久久精品人人做人人综合 | 国产综合久久久久久久久久久久| 亚洲男帅同性gay1069| 亚洲一级在线观看| 婷婷一区二区三区| 久草在线在线精品观看| 久久精品二区亚洲w码| 精品亚洲porn| 成人免费视频国产在线观看| 成人在线综合网站| 色综合咪咪久久| jizzjizzjizz欧美| eeuss鲁片一区二区三区 | 精品久久久久一区二区国产| 精品精品欲导航| 久久久美女毛片| 中文字幕一区二区三区在线播放| 亚洲精品国产精华液| 香蕉加勒比综合久久| 美女爽到高潮91| 国产成人自拍在线| 色婷婷精品久久二区二区蜜臂av| www..com久久爱| 97se亚洲国产综合在线| 色哦色哦哦色天天综合| 色女孩综合影院| 色网站国产精品| 91精品国产91热久久久做人人| 精品福利一区二区三区| 国产精品国产三级国产普通话三级| 一区二区三区免费在线观看| 日韩高清在线电影| 成人av在线资源网| 欧美日韩国产不卡| 国产欧美一区二区精品婷婷| 一区二区三区av电影| 蜜桃久久久久久| 99精品偷自拍| 日韩欧美一级在线播放| 日韩一区中文字幕| 美国三级日本三级久久99| 成人在线一区二区三区| 欧美精品视频www在线观看| 国产午夜精品一区二区三区嫩草 | 91首页免费视频| 欧美性大战久久久| 久久久五月婷婷| 一区二区三区日韩在线观看| 国产麻豆视频一区| 欧美午夜寂寞影院| 亚洲国产精品传媒在线观看| 亚洲第一久久影院| 99久久99精品久久久久久| 日韩欧美一级二级三级久久久| 亚洲男人的天堂av| 狠狠色综合日日| 精品视频一区二区三区免费| 欧美高清在线视频| 美女精品一区二区| 欧美最猛性xxxxx直播| 六月丁香婷婷久久| 在线免费不卡电影| 中文子幕无线码一区tr| 久久国产精品色婷婷| 欧美日韩国产影片| 亚洲人成影院在线观看| 精品一区二区三区在线观看国产| 91在线观看视频| 久久精品欧美一区二区三区麻豆| 奇米888四色在线精品| 欧美日韩一区二区三区不卡| 国产精品不卡一区| 国产999精品久久久久久| 精品毛片乱码1区2区3区| 爽爽淫人综合网网站| 在线一区二区三区| 亚洲视频免费看| 成人一二三区视频| 欧美国产一区二区在线观看| 精品一区精品二区高清| 日韩精品一区二区三区四区 | 国产在线国偷精品产拍免费yy| 欧美军同video69gay| 亚洲成av人片| 欧美综合天天夜夜久久| 亚洲卡通动漫在线| 99视频一区二区| 国产精品的网站| av在线综合网| 亚洲男同性视频| 成人综合在线网站| 国产欧美精品一区二区色综合朱莉| 国产成人在线电影| 亚洲精品一线二线三线| 麻豆91精品视频| 精品国产1区2区3区| 国精品**一区二区三区在线蜜桃| 精品欧美乱码久久久久久1区2区| 免费一级片91| 欧美精品一区二区不卡| 国产在线播精品第三| 中文一区二区完整视频在线观看| 高清在线观看日韩| 亚洲视频你懂的| 欧美性猛交xxxx乱大交退制版 | 国产精品一区二区免费不卡| 久久先锋资源网| 成人av在线播放网站| 一区二区三区美女视频| 欧美在线免费视屏| 美女脱光内衣内裤视频久久网站 | 国产精品国产三级国产有无不卡| 成人高清免费观看| 一区二区三区四区在线免费观看 | 日韩国产精品久久久| 日韩一区二区三区免费看| 精品一区二区国语对白| 国产亚洲欧美激情| 日本久久一区二区三区| 亚洲va欧美va国产va天堂影院| 69精品人人人人| 国产在线精品一区二区不卡了| 欧美韩国日本不卡| 欧美曰成人黄网| 九九热在线视频观看这里只有精品| 久久综合九色欧美综合狠狠| av电影一区二区| 日本vs亚洲vs韩国一区三区二区| 欧美精品一区在线观看| 懂色av一区二区三区免费看| 亚洲丝袜自拍清纯另类| 色综合天天综合色综合av| 亚洲午夜私人影院| 欧美丰满一区二区免费视频 | 美女诱惑一区二区| 国产精品久久久久一区| 欧美一区二区视频在线观看 | 韩国三级中文字幕hd久久精品|