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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nlmeans.h

?? this a image processing program
?? H
字號:
/*-----------------------------------------------------------------------------------------  File        : nlmeans.h  Description : CImg plugin that implements the non-local mean filter, as described in :    [1] Buades, A.; Coll, B.; Morel, J.-M.: A non-local algorithm for image denoising        IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2005. CVPR 2005.        Volume 2,  20-25 June 2005 Page(s):60 - 65 vol. 2    [2] Buades, A. Coll, B. and Morel, J.: A review of image denoising algorithms, with a new one.        Multiscale Modeling and Simulation: A SIAM Interdisciplinary Journal 4 (2004) 490-530    [3] Gasser, T. Sroka,L. Jennen Steinmetz,C. Residual variance and residual pattern nonlinear regression.        Biometrika 73 (1986) 625-659  Copyright   : Jerome Boulanger - http://www.irisa.fr/vista/Equipe/People/Jerome.Boulanger.html  This software is governed by the CeCILL  license under French law and  abiding by the rules of distribution of free software.  You can  use,  modify and/ or redistribute the software under the terms of the CeCILL  license as circulated by CEA, CNRS and INRIA at the following URL  "http://www.cecill.info".  As a counterpart to the access to the source code and  rights to copy,  modify and redistribute granted by the license, users are provided only  with a limited warranty  and the software's author,  the holder of the  economic rights,  and the successive licensors  have only  limited  liability.  In this respect, the user's attention is drawn to the risks associated  with loading,  using,  modifying and/or developing or reproducing the  software by the user in light of its specific status of free software,  that may mean  that it is complicated to manipulate,  and  that  also  therefore means  that it is reserved for developers  and  experienced  professionals having in-depth computer knowledge. Users are therefore  encouraged to load and test the software's suitability as regards their  requirements in conditions enabling the security of their systems and/or  data to be ensured and,  more generally, to use and operate it in the  same conditions as regards security.  The fact that you are presently reading this means that you have had  knowledge of the CeCILL license and that you accept its terms.------------------------------------------------------------------------------------------*/#ifndef cimg_plugin_nlmeans#define cimg_plugin_nlmeans#include "noise_analysis.h"//! NL-Means denoising algorithm./**   This is the in-place version of get_nlmean().**/CImg<T>& nlmeans(int patch_size=1, double lambda=-1, double alpha=3, double sigma=-1, int sampling=1){  if (!is_empty()){    if (sigma<0) sigma=std::sqrt(noise_variance()); // noise variance estimation    double np=(2*patch_size+1)*(2*patch_size+1)*dimv()/(double)sampling;    if (lambda<0) // Bandwidth estimation      if (np<100)	lambda =(((((( 1.1785e-12*np -5.1827e-10)*np+ 9.5946e-08)*np -9.7798e-06)*np+ 6.0756e-04)*np -0.0248)*np+ 1.9203)*np +7.9599;      else	lambda = (-7.2611e-04*np+ 1.3213)*np+ 15.2726;#if cimg_debug==1      fprintf(stderr,"Size of the patch                                 : %dx%d \n",	      2*patch_size+1,2*patch_size+1);      fprintf(stderr,"Size of window where similar patch are looked for : %dx%d \n",	      (int)(alpha*(2*patch_size+1)),(int)(alpha*(2*patch_size+1)));      fprintf(stderr,"Bandwidth of the kernel                           : %fx%f^2 \n",	      lambda,sigma);      fprintf(stderr,"Noise standard deviation estimated to             : %f \n",	      sigma);#endif    CImg<T> dest(dimx(),dimy(),dimz(),dimv(),0);    double * uhat = new double[dimv()];    double h2=-.5/(lambda*sigma*sigma); // [Kervrann] notations    if (dimz()!=1){// 3D case      CImg<> P=(*this).get_blur(1); // inspired from Mahmoudi&Sapiro SPletter dec 05      int n_simu=64;      CImg<> tmp(n_simu,n_simu,n_simu);      double sig = std::sqrt(tmp.fill(0.f).noise(sigma).blur(1).pow(2.).sum()/(n_simu*n_simu*n_simu));      int patch_size_z=0;      int pxi=(int)(alpha*patch_size),	pyi=(int)(alpha*patch_size),	pzi=2;//Define the size of the neighborhood in z      for (int zi=0;zi<dimz();zi++){#if cimg_debug==1	fprintf(stderr,"\rProcessing : %3d %%",(int)((float)zi/(float)dimz()*100.));fflush(stdout);#endif	for (int yi=0;yi<dimy();yi++)	  for (int xi=0;xi<dimx();xi++){	    for (int v=0;v<dimv();v++) uhat[v] = 0;	    float sw=0,wmax=-1;	    for (int zj=cimg::max(0,zi-pzi);zj<cimg::min(dimz(),zi+pzi+1);zj++)	      for (int yj=cimg::max(0,yi-pyi);yj<cimg::min(dimy(),yi+pyi+1);yj++)		for (int xj=cimg::max(0,xi-pxi);xj<cimg::min(dimx(),xi+pxi+1);xj++)		  if( cimg::abs(P(xi,yi,zi)-P(xj,yj,zj))/sig < 3){		    double d = 0;		    int n = 0;		    if (xi!=xj && yi!=yj && zi!=zj){		      for (int kz=-patch_size_z;kz<patch_size_z+1;kz+=sampling){			int zj_ = zj+kz;			int zi_ = zi+kz;			if (zj_>=0 && zj_<dimz() && zi_>=0 && zi_<dimz())			  for (int ky=-patch_size;ky<=patch_size;ky+=sampling){			    int yj_ = yj+ky;			    int yi_ = yi+ky;			    if (yj_>=0 && yj_<dimy() && yi_>=0 && yi_<dimy())			      for (int kx=-patch_size;kx<=patch_size;kx+=sampling){				int xj_ = xj+kx;				int xi_ = xi+kx;				if (xj_>=0 && xj_<dimx() && xi_>=0 && xi_<dimx())				  for (int v=0;v<dimv();v++){				    double d1 = (*this)(xj_,yj_,zj_,v)-(*this)(xi_,yi_,zi_,v);				    d += d1*d1;				    n++;				  }			      }			  }		      }			  float w = (float)std::exp(d*h2);		      wmax = w>wmax?w:wmax;		      for (int v=0;v<dimv();v++) uhat[v] += w*(*this)(xj,yj,zj,v);		      sw += w;		    }		  }	    // add the central pixel		{ for (int v=0;v<dimv();v++) uhat[v] += wmax*(*this)(xi,yi,zi,v); }	    sw += wmax;		{ for (int v=0;v<dimv();v++) dest(xi,yi,zi,v)= (T) (uhat[v] /= sw); }	  }      }    }    else{ // 2D case      CImg<> P=(*this).get_blur(1); // inspired from Mahmoudi&Sapiro SPletter dec 05      int n_simu=512;      CImg<> tmp(n_simu,n_simu);      double sig = std::sqrt(tmp.fill(0.f).noise(sigma).blur(1).pow(2.).sum()/(n_simu*n_simu));      int pxi=(int)(alpha*patch_size),pyi=(int)(alpha*patch_size);//Define the size of the neighborhood      for (int yi=0;yi<dimy();yi++){#if cimg_debug==1	fprintf(stderr,"\rProcessing : %3d %%",(int)((float)yi/(float)dimy()*100.));fflush(stdout);#endif	for (int xi=0;xi<dimx();xi++){	  for (int v=0;v<dimv();v++) uhat[v] = 0;	  float sw=0,wmax=-1;	  for (int yj=cimg::max(0,yi-pyi);yj<cimg::min(dimy(),yi+pyi+1);yj++)	    for (int xj=cimg::max(0,xi-pxi);xj<cimg::min(dimx(),xi+pxi+1);xj++)	      if( cimg::abs(P(xi,yi)-P(xj,yj))/sig < 3.){		double d = 0;		int n = 0;		if (!(xi==xj && yi==yj))		  for (int ky=-patch_size;ky<patch_size+1;ky+=sampling){		    int yj_ = yj+ky;		    int yi_ = yi+ky;		    if (yj_>=0 && yj_<dimy() && yi_>=0 && yi_<dimy())		      for (int kx=-patch_size;kx<patch_size+1;kx+=sampling){			int xj_ = xj+kx;			int xi_ = xi+kx;			if (xj_>=0 && xj_<dimx() && xi_>=0 && xi_<dimx())			  for (int v=0;v<dimv();v++){			    double d1 = (*this)(xj_,yj_,v)-(*this)(xi_,yi_,v);			    d += d1*d1;			    n++;			  }		      }		  }		float w=(float)std::exp(d*h2);		for (int v=0;v<dimv();v++) uhat[v] += w*(*this)(xj,yj,v);		wmax = w>wmax?w:wmax; // Store the maximum of the weights		sw += w; // Compute the sum of the weights	      }	  // add the central pixel with the maximum weight		  { for (int v=0;v<dimv();v++) uhat[v] += wmax*(*this)(xi,yi,v); }	  sw += wmax;	  // Compute the estimate for the current pixel	  { for (int v=0;v<dimv();v++) dest(xi,yi,v)= (T) (uhat[v] /= sw); }	}      }// main loop    }// 2d    delete [] uhat;    *this=dest;#if cimg_debug==1    fprintf(stderr,"\n"); // make a new line#endif  }// is empty  return *this;}//! Get the result of the NL-Means denoising algorithm.    /**       \param patch_size = radius of the patch (1=3x3 by default)       \param lambda = bandwidth ( -1 by default : automatic selection)       \param alpha  = size of the region where similar patch are searched (3 x patch_size = 9x9 by default)       \param sigma = noise standard deviation (-1 = estimation)       \param sampling = sampling of the patch (1 = uses all point, 2 = uses one point on 4, etc)       If the image has three dimensions then the patch is only in  2D and the neighborhood extent in time is only 5.       If the image has several channel (color images), the distance between the two patch is computed using       all the channels.       The greater the patch is the best is the result.       Lambda parameter is function of the size of the patch size. The automatic Lambda parameter is taken       in the Chi2 table at a significiance level of 0.01. This diffear from the original paper [1]. The weighted average becomes then:       \f$$ \hat{f}(x,y) = \sum_{x',y'} \frac{1}{Z} exp(\frac{P(x,y)-P(x',y')}{2 \lambda \sigma^2}) f(x',y') $$\f       where \f$ P(x,y) $\f denotes the patch in (x,y) location.       An a priori is also used to increase the speed of the algorithm in the spirit of Sapiro et al. SPletter dec 05       This very basic version of the Non-Local Means algorithm provides an output image which contains       some residual noise with a relatively small variance (\f$\sigma<5$\f).       [1] A non-local algorithm for image denoising           Buades, A.; Coll, B.; Morel, J.-M.;           Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on           Volume 2,  20-25 June 2005 Page(s):60 - 65 vol. 2    **/CImg<T> get_nlmeans( int patch_size=1,  double lambda=-1, double alpha=3 ,double sigma=-1, int sampling=1)   {  return CImg<T>(*this).nlmeans(patch_size,lambda,alpha,sigma,sampling);}#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成年人国产精品| 久久亚洲综合色| 欧美日韩视频一区二区| 在线看不卡av| 欧美午夜精品电影| 欧美午夜精品免费| 欧美日韩国产综合视频在线观看| 欧美性大战久久久| 91精品国产aⅴ一区二区| 日韩欧美中文字幕制服| 久久综合九色综合久久久精品综合| 精品国产露脸精彩对白| 久久久久久久久久久电影| 欧美激情一区二区三区全黄| 中文字幕五月欧美| 一区二区三区高清| 日韩中文字幕91| 久久国产精品第一页| 国产高清一区日本| 色综合久久综合网97色综合| 欧美亚洲动漫制服丝袜| 欧美一级久久久久久久大片| 精品国产乱码久久久久久影片| 欧美高清在线视频| 亚洲精品日韩一| 日韩av一区二| 国产精品1区二区.| 在线精品视频小说1| 日韩小视频在线观看专区| 日本一区二区三区国色天香| 亚洲三级理论片| 免费的国产精品| 成人app在线| 欧美日韩黄视频| 国产欧美精品一区二区三区四区| 亚洲男同性恋视频| 蜜桃视频一区二区三区在线观看| 国产精品夜夜嗨| 91九色最新地址| 精品久久一区二区三区| 亚洲精品网站在线观看| 美女视频一区二区| 91麻豆.com| 精品精品欲导航| 樱桃国产成人精品视频| 麻豆精品国产传媒mv男同| 99re6这里只有精品视频在线观看| 欧美精品久久久久久久久老牛影院| 久久久91精品国产一区二区三区| 亚洲午夜免费电影| 高清成人在线观看| 在线电影一区二区三区| 国产精品乱人伦中文| 婷婷一区二区三区| 9i在线看片成人免费| 日韩美女一区二区三区| 亚洲视频一区二区免费在线观看| 日韩激情一二三区| 成人网在线播放| 欧美一区二区三区啪啪| 亚洲激情自拍视频| 国产乱妇无码大片在线观看| 欧美影院午夜播放| 欧美激情一区二区三区四区| 日韩va亚洲va欧美va久久| 91蝌蚪porny九色| 国产丝袜欧美中文另类| 蜜桃在线一区二区三区| 欧美性大战久久久| 亚洲欧洲日韩一区二区三区| 国产曰批免费观看久久久| 欧美撒尿777hd撒尿| 国产精品青草久久| 国产一区二区在线影院| 91精品国产高清一区二区三区蜜臀| 亚洲欧美精品午睡沙发| 国产91精品精华液一区二区三区| 7777精品伊人久久久大香线蕉| 中文字幕一区二区5566日韩| 国产一区中文字幕| 5月丁香婷婷综合| 国产精品一区二区果冻传媒| 欧美网站一区二区| 国产精品天美传媒| 麻豆视频一区二区| 欧美日高清视频| 亚洲久本草在线中文字幕| 成人激情黄色小说| 久久久久久久电影| 九九视频精品免费| 日韩一二三区不卡| 日本女人一区二区三区| 欧美性色黄大片| 亚洲综合色在线| 91最新地址在线播放| 中文字幕一区免费在线观看| 成人自拍视频在线| 久久久久久久一区| 国产在线视频精品一区| 久久综合色鬼综合色| 国模少妇一区二区三区| 亚洲精品一区二区三区四区高清| 蜜臀av一级做a爰片久久| 日韩一区二区影院| 久久精品国产99国产| 日韩欧美国产综合一区| 日本aⅴ免费视频一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 美女脱光内衣内裤视频久久影院| 欧美日韩在线直播| 日韩国产在线一| 欧美一区二区三区的| 精油按摩中文字幕久久| 2020国产精品| 成人久久久精品乱码一区二区三区 | 精品日韩一区二区三区| 狠狠色狠狠色综合日日91app| 久久久综合视频| 国产精品一区二区三区四区| 欧美国产亚洲另类动漫| 91麻豆蜜桃一区二区三区| 亚洲一区二区在线免费看| 欧美另类高清zo欧美| 美女免费视频一区二区| 日韩美女视频在线| 国产精品乡下勾搭老头1| 中文字幕在线不卡一区二区三区| 91国产成人在线| 美女在线视频一区| 欧美经典三级视频一区二区三区| 成人手机在线视频| 一区二区三区在线视频播放| 91精品国产欧美一区二区成人| 精品一区二区三区久久久| 国产精品视频麻豆| 欧美在线视频全部完| 伦理电影国产精品| 中文字幕乱码久久午夜不卡| 91搞黄在线观看| 久久99国产精品尤物| 国产精品家庭影院| 91精品视频网| 粉嫩av一区二区三区| 亚洲高清中文字幕| 国产视频一区二区三区在线观看| 色猫猫国产区一区二在线视频| 欧美aaa在线| 中文字幕一区二区三区不卡在线 | 欧美视频三区在线播放| 麻豆中文一区二区| 国产精品网站一区| 91精品久久久久久久久99蜜臂| 国产毛片精品视频| 亚洲伊人色欲综合网| 久久综合视频网| 欧美日韩午夜影院| 成人爽a毛片一区二区免费| 日韩成人一级片| 亚洲特级片在线| 26uuu另类欧美| 欧美日韩视频不卡| 北岛玲一区二区三区四区| 日本三级韩国三级欧美三级| 亚洲私人黄色宅男| 久久在线免费观看| 51久久夜色精品国产麻豆| 99久久免费精品| 国产精品一区三区| 午夜精品福利一区二区蜜股av | 国产毛片精品国产一区二区三区| 亚洲一区二区美女| 中文字幕一区二区三区在线不卡 | 欧美一区二区成人| 一本大道久久a久久综合| 国内欧美视频一区二区| 亚洲6080在线| 亚洲人成人一区二区在线观看| 精品国产sm最大网站| 91精品国产综合久久久久久| 91老司机福利 在线| 懂色av一区二区三区免费看| 麻豆精品国产传媒mv男同| 午夜在线电影亚洲一区| 亚洲欧美日韩中文播放| 欧美激情资源网| 久久精品欧美日韩| 2023国产精华国产精品| 日韩欧美国产精品一区| 欧美福利视频一区| 欧美在线一二三四区| 99re热这里只有精品视频| 成人丝袜18视频在线观看| 国产精品资源在线观看| 久久99精品久久久久婷婷| 免费xxxx性欧美18vr| 丝袜亚洲另类欧美| 性感美女久久精品| 亚洲成人在线免费| 亚洲福利一区二区三区| 亚洲影视在线观看|