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

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

?? greycstoration.h

?? this a image processing program
?? H
字號:
/*-----------------------------------------------------------------------------  File        : greycstoration.h  Description : GREYCstoration PLUG-IN allowing easy integration in  third parties softwares.  (see http://www.greyc.ensicaen.fr/~dtschump/greycstoration/)  THIS VERSION IS FOR DEVELOPERS ONLY. IT EASES THE INTEGRATION ALGORITHM IN  THIRD PARTIES SOFTWARES. IF YOU ARE A USER OF GREYCSTORATION, PLEASE LOOK  AT THE FILE 'greycstoration.cpp' WHICH IS THE SOURCE OF THE COMPLETE  COMMAND LINE GREYCSTORATION TOOL.  Copyright  : David Tschumperle - http://www.greyc.ensicaen.fr/~dtschump/  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_greycstoration// This tells you about the version of the GREYCstoration algorithm implemented#define cimg_plugin_greycstoration 2.51//------------------------------------------------------------------------------// GREYCstoration structure, storing important informations about algorithm// parameters and computing threads//-------------------------------------------------------------------------------struct _greycstoration_params {  // Parameters needed for the GREYCstoration regularization algorithm.  const CImg<unsigned char>    *mask;  float    amplitude,    sharpness,    anisotropy,    alpha,    sigma,    gfact,    dl,    da,    gauss_prec;  unsigned int    interpolation;  bool    fast_approx;  // Parameters for the different threads.  CImg<T>    *source,    *temporary;  unsigned long    *counter;  unsigned int    tile,    tile_border,    thread,    threads;  bool    is_running,    *stop_request;  // Default constructor  _greycstoration_params():mask(0),amplitude(0),sharpness(0),anisotropy(0),alpha(0),sigma(0),gfact(1),                           dl(0),da(0),gauss_prec(0),interpolation(0),fast_approx(false),                           source(0),temporary(0),counter(0),tile(0),tile_border(0),thread(0),threads(0),                           is_running(false), stop_request(0) {}};_greycstoration_params greycstoration_params[16];//------------------------------------------------------------------------------// GREYCstoration threaded function//-------------------------------------------------------------------------------#if cimg_OS==1static void* greycstoration_thread(void *arg) {#elif cimg_OS==2  static DWORD WINAPI greycstoration_thread(void *arg) {#endif    _greycstoration_params &p = *(_greycstoration_params*)arg;    const CImg<unsigned char> &mask = *(p.mask);    CImg<T> &source = *(p.source);    if (!p.tile) {      // Non-tiled version      //------------------      source.blur_anisotropic(mask,p.amplitude,p.sharpness,p.anisotropy,p.alpha,p.sigma,p.dl,p.da,p.gauss_prec,                              p.interpolation,p.fast_approx,p.gfact);    } else {      // Tiled version      //---------------      CImg<T> &temporary = *(p.temporary);      const bool threed = (source.depth>1);      const unsigned int b = p.tile_border;      unsigned int ctile = 0;      if (threed) {        for (unsigned int z=0; z<source.depth && !*(p.stop_request); z+=p.tile)          for (unsigned int y=0; y<source.height && !*(p.stop_request); y+=p.tile)            for (unsigned int x=0; x<source.width && !*(p.stop_request); x+=p.tile)              if (((ctile++)%p.threads)==p.thread) {                const unsigned int                  x1 = x+p.tile-1,                  y1 = y+p.tile-1,                  z1 = z+p.tile-1,                  xe = x1<source.width?x1:source.width-1,                  ye = y1<source.height?y1:source.height-1,                  ze = z1<source.depth?z1:source.depth-1;                CImg<T> img = source.get_crop(x-b,y-b,z-b,xe+b,ye+b,ze+b,true);                CImg<unsigned char> mask_tile = mask.is_empty()?mask:mask.get_crop(x-b,y-b,z-b,xe+b,ye+b,ze+b,true);                img.greycstoration_params[0] = p;                img.blur_anisotropic(mask_tile,p.amplitude,p.sharpness,p.anisotropy,                                     p.alpha,p.sigma,p.dl,p.da,p.gauss_prec,p.interpolation,p.fast_approx,p.gfact);                temporary.draw_image(img.crop(b,b,b,img.width-b,img.height-b,img.depth-b),x,y,z);              }      } else {        for (unsigned int y=0; y<source.height && !*(p.stop_request); y+=p.tile)          for (unsigned int x=0; x<source.width && !*(p.stop_request); x+=p.tile)            if (((ctile++)%p.threads)==p.thread) {              const unsigned int                x1 = x+p.tile-1,                y1 = y+p.tile-1,                xe = x1<source.width?x1:source.width-1,                ye = y1<source.height?y1:source.height-1;              CImg<T> img = source.get_crop(x-b,y-b,xe+b,ye+b,true);              CImg<unsigned char> mask_tile = mask.is_empty()?mask:mask.get_crop(x-b,y-b,xe+b,ye+b,true);              img.greycstoration_params[0]=p;              img.blur_anisotropic(mask_tile,p.amplitude,p.sharpness,p.anisotropy,                                   p.alpha,p.sigma,p.dl,p.da,p.gauss_prec,p.interpolation,p.fast_approx,p.gfact);              temporary.draw_image(img.crop(b,b,img.width-b,img.height-b),x,y);            }      }    }    if (!p.thread) {      if (p.threads>1) {        bool stopflag = true;        do {          stopflag = true;          for (unsigned int k=1; k<p.threads; k++) if (source.greycstoration_params[k].is_running) stopflag = false;          if (!stopflag) cimg::wait(50);        } while (!stopflag);      }      if (p.counter) delete p.counter;      if (p.temporary) { source = *(p.temporary); delete p.temporary; }      if (p.stop_request) delete p.stop_request;      p.mask = 0;      p.amplitude = p.sharpness = p.anisotropy = p.alpha = p.sigma = p.gfact = p.dl = p.da = p.gauss_prec = 0;      p.interpolation = 0;      p.fast_approx = false;      p.source = 0;      p.temporary = 0;      p.counter = 0;      p.tile = p.tile_border = p.thread = p.threads = 0;      p.stop_request = false;    }    p.is_running = false;#if cimg_OS==1    pthread_exit(arg);    return arg;#elif cimg_OS==2    ExitThread(0);    return 0;#endif  }  //----------------------------------------------------------  // Public GREYCstoration plugin API  // Use the functions below for integrating GREYCstoration  // in your own code.  //----------------------------------------------------------  //! Test if GREYCstoration threads are currently running.  bool greycstoration_is_running() const {    return greycstoration_params->is_running;  }  //! Force GREYCstoration threads to stop.  CImg& greycstoration_stop() {    if (greycstoration_is_running()) {      *(greycstoration_params->stop_request) = true;      while (greycstoration_params->is_running) cimg::wait(50);    }    return *this;  }  //! Return the GREYCstoration progression indice.  float greycstoration_progress() const {    if (!greycstoration_is_running()) return 0.0f;    const unsigned long counter = greycstoration_params->counter?*(greycstoration_params->counter):0;    const float da = greycstoration_params->da;    float maxcounter = 0;    if (greycstoration_params->tile==0) maxcounter = width*height*(1 + 360/da);    else {      const unsigned int        t = greycstoration_params->tile,        b = greycstoration_params->tile_border,        n = (1+(width-1)/t)*(1+(height-1)/t)*(1+(depth-1)/t);      maxcounter = (width*height + n*4*b*(b + t))*(1 + 360/da);    }    return cimg::min(counter*99.9f/maxcounter,99.9f);  }  //! Run the threaded GREYCstoration algorithm on the instance image, using a mask.  CImg& greycstoration_run(const CImg<unsigned char>& mask,                           const float amplitude=60, const float sharpness=0.7f, const float anisotropy=0.3f,                           const float alpha=0.6f,const float sigma=1.1f, const float gfact=1.0f,                           const float dl=0.8f,const float da=30.0f,                           const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,                           const unsigned int tile=0, const unsigned int tile_border=0, const unsigned int threads=1) {    if (greycstoration_is_running())      throw CImgInstanceException("CImg<T>::greycstoration_run() : Another GREYCstoration thread is already running on"                                  " instance image (%u,%u,%u,%u,%p).",width,height,depth,dim,data);    else {      if (!mask.is_empty() && !mask.is_sameXY(*this))        throw CImgArgumentException("CImg<%s>::greycstoration_run() : Given mask (%u,%u,%u,%u,%p) and instance image "                                    "(%u,%u,%u,%u,%p) have different dimensions.",                                    pixel_type(),mask.width,mask.height,mask.depth,mask.dim,mask.data,width,height,depth,dim,data);      cimg::warn(threads>16,"CImg<%s>::greycstoration_run() : Multi-threading mode limited to 16 threads max.");      const unsigned int        ntile = (tile && (tile<width || tile<height || (depth>1 && tile<depth)))?tile:0,        nthreads = ntile?cimg::max(cimg::min(threads,16U),1U):1;      CImg<T> *const temporary = ntile?new CImg<T>(*this):0;      unsigned long *const counter = new unsigned long;      *counter = 0;      bool *const stop_request = new bool;      *stop_request = false;      for (unsigned int k=0; k<nthreads; k++) {        greycstoration_params[k].mask = &mask;        greycstoration_params[k].amplitude = amplitude;        greycstoration_params[k].sharpness = sharpness;        greycstoration_params[k].anisotropy = anisotropy;        greycstoration_params[k].alpha = alpha;        greycstoration_params[k].sigma = sigma;        greycstoration_params[k].gfact = gfact;        greycstoration_params[k].dl = dl;        greycstoration_params[k].da = da;        greycstoration_params[k].gauss_prec = gauss_prec;        greycstoration_params[k].interpolation = interpolation;        greycstoration_params[k].fast_approx = fast_approx;        greycstoration_params[k].source = this;        greycstoration_params[k].temporary = temporary;        greycstoration_params[k].counter = counter;        greycstoration_params[k].tile = ntile;        greycstoration_params[k].tile_border = tile_border;        greycstoration_params[k].thread = k;        greycstoration_params[k].threads = nthreads;        greycstoration_params[k].is_running = true;        greycstoration_params[k].stop_request = stop_request;      }#if cimg_OS==1      pthread_attr_t attr;      pthread_attr_init(&attr);      pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);      for (unsigned int k=0; k<greycstoration_params->threads; k++) {        pthread_t thread;        const int err = pthread_create(&thread, &attr, greycstoration_thread, (void*)(greycstoration_params+k));        if (err) throw CImgException("CImg<%s>::greycstoration_run() : pthread_create returned error %d",                                     pixel_type(), err);      }#elif cimg_OS==2      for (unsigned int k=0; k<greycstoration_params->threads; k++) {        unsigned long ThreadID = 0;        CreateThread(0,0,greycstoration_thread,(void*)(greycstoration_params+k),0,&ThreadID);      }#else      throw CImgInstanceException("CImg<T>::greycstoration_run() : Threads are not supported, please define cimg_OS first.");#endif    }    return *this;  }  //! Run the GREYCstoration algorithm on the instance image.  CImg& greycstoration_run(const float amplitude=50, const float sharpness=0.7f, const float anisotropy=0.3f,                           const float alpha=0.6f,const float sigma=1.1f, const float gfact=1.0f,                           const float dl=0.8f,const float da=30.0f,                           const float gauss_prec=2.0f, const unsigned int interpolation=0, const bool fast_approx=true,                           const unsigned int tile=0, const unsigned int tile_border=0, const unsigned int threads=1) {    static const CImg<unsigned char> empty_mask;    return greycstoration_run(empty_mask,amplitude,sharpness,anisotropy,alpha,sigma,gfact,dl,da,gauss_prec,                              interpolation,fast_approx,tile,tile_border,threads);  }#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一区| 欧美日韩亚洲丝袜制服| 九色|91porny| 美女视频一区在线观看| 国产综合久久久久影院| 精品无人区卡一卡二卡三乱码免费卡 | 亚洲午夜精品在线| 日韩毛片精品高清免费| 国产嫩草影院久久久久| 国产午夜三级一区二区三| 51午夜精品国产| 国产精品国产三级国产有无不卡| 亚洲美女屁股眼交| 日韩va欧美va亚洲va久久| 天天综合网天天综合色| 久久66热re国产| av在线不卡免费看| 91精品国产综合久久久久久久久久| 欧美丰满美乳xxx高潮www| 精品日韩欧美在线| 国产精品国产三级国产普通话蜜臀| 国产精品一区二区视频| 色综合久久天天| 欧美成人伊人久久综合网| 国产精品美女一区二区| 青青青爽久久午夜综合久久午夜 | 国产精品一区一区三区| 在线亚洲+欧美+日本专区| 26uuuu精品一区二区| 五月激情六月综合| 在线看国产日韩| 国产精品国产三级国产普通话99| 九九**精品视频免费播放| 在线观看亚洲专区| 国产精品国产馆在线真实露脸| 国产综合色视频| 精品国产伦一区二区三区观看方式 | 一本大道久久a久久精品综合| 久久久久久免费毛片精品| 视频一区免费在线观看| 欧美日韩精品一区二区三区蜜桃| 亚洲精品免费在线| 538prom精品视频线放| 日韩电影在线观看电影| 欧美精品 日韩| 亚洲午夜激情网页| 91精品蜜臀在线一区尤物| 一区二区三区在线免费播放| 欧美视频自拍偷拍| 青青草成人在线观看| 日韩视频一区二区三区| 久久成人免费网| 久久婷婷国产综合精品青草| 丝袜亚洲精品中文字幕一区| 欧美午夜视频网站| 亚洲国产成人精品视频| 欧美在线免费视屏| 免费av网站大全久久| 国产精品国产三级国产普通话三级 | 最新日韩在线视频| 欧美日本在线观看| 久久9热精品视频| 亚洲欧美日韩国产中文在线| 日本高清成人免费播放| 极品少妇xxxx精品少妇| 亚洲人xxxx| 欧美激情一区二区三区| 欧美男同性恋视频网站| 国产成人免费视频一区| 一区2区3区在线看| 国产精品久久777777| 日韩午夜在线影院| 精品视频一区 二区 三区| 国产做a爰片久久毛片| 偷拍日韩校园综合在线| 中文字幕永久在线不卡| 精品电影一区二区三区| 3d动漫精品啪啪一区二区竹菊 | 国产成a人亚洲| 亚洲一区二区三区四区不卡| 日韩一区二区视频在线观看| 欧美日韩高清一区二区不卡| 99久精品国产| 91免费版在线| 欧美日韩一区二区电影| 在线观看三级视频欧美| 91亚洲精品一区二区乱码| 狠狠色丁香久久婷婷综合_中| 麻豆国产欧美日韩综合精品二区| 亚洲一区国产视频| 天天色综合天天| 懂色av一区二区三区免费看| 国产精品亚洲午夜一区二区三区| 奇米影视一区二区三区| 国产二区国产一区在线观看| 综合激情网...| 亚洲视频精选在线| 日韩中文字幕不卡| 国产精品一区二区在线播放| 成人午夜激情影院| 日本丶国产丶欧美色综合| 欧美色精品天天在线观看视频| 欧美久久久久久久久| 精品国产百合女同互慰| 国产精品久久久久久亚洲毛片| 亚洲精品成人悠悠色影视| 亚洲福利视频一区| 成人理论电影网| 3d动漫精品啪啪| 亚洲天堂中文字幕| 看国产成人h片视频| 99免费精品在线观看| 日韩视频在线你懂得| 亚洲美女免费在线| 国产中文字幕精品| 欧美日韩情趣电影| 自拍偷自拍亚洲精品播放| 韩国三级在线一区| 51午夜精品国产| 亚洲电影激情视频网站| 99视频国产精品| 国产欧美精品日韩区二区麻豆天美| 一区二区三区**美女毛片| 成人激情小说网站| 欧美激情中文字幕一区二区| 精品一区二区三区免费毛片爱| 欧美艳星brazzers| 亚洲电影一级黄| 欧美日韩精品一区二区三区四区| 综合色中文字幕| 欧美在线三级电影| 午夜视黄欧洲亚洲| 91精品国产综合久久精品麻豆| 一级女性全黄久久生活片免费| 91成人在线免费观看| 亚洲高清一区二区三区| 337p亚洲精品色噜噜噜| 久久超碰97中文字幕| 国产精品久久久久久久久免费樱桃| 欧美性高清videossexo| 国产99久久久久久免费看农村| 首页国产丝袜综合| 亚洲高清中文字幕| 日韩精品欧美成人高清一区二区| 久久综合色之久久综合| 日韩一区二区免费在线电影| 欧美午夜片在线观看| 99视频在线观看一区三区| 成人小视频免费观看| 国产高清亚洲一区| 国产999精品久久久久久绿帽| 亚洲成人先锋电影| 亚洲精品乱码久久久久久日本蜜臀| 色综合久久中文综合久久97| 日韩在线一二三区| 亚洲欧美国产高清| 久久久国产精品麻豆| 欧美一区二区三区婷婷月色| 成人精品鲁一区一区二区| 日本伊人色综合网| 一二三区精品视频| 亚洲自拍偷拍综合| 综合婷婷亚洲小说| 欧美国产综合一区二区| 日韩丝袜美女视频| 欧美不卡一区二区三区四区| 欧美四级电影网| 欧美日韩国产不卡| 欧美亚洲高清一区二区三区不卡| 成人高清免费在线播放| 高清在线成人网| a在线欧美一区| 日本韩国精品在线| 欧美三级视频在线观看| 欧美高清视频一二三区 | 亚洲美女偷拍久久| 麻豆精品在线看| 亚洲另类春色国产| 久久久久久免费网| 欧美日韩成人在线一区| 久久99国产精品麻豆| 亚洲激情av在线| 盗摄精品av一区二区三区| 奇米色一区二区| 亚洲免费av观看| 中文字幕一区二区三区四区| 国产日韩欧美一区二区三区综合| 日韩欧美在线1卡| 国产日产亚洲精品系列| 国产精品久久福利| 日日噜噜夜夜狠狠视频欧美人| 青青草国产成人99久久| 国产91精品精华液一区二区三区| 国产99一区视频免费| 91九色02白丝porn| 精品剧情v国产在线观看在线| 精品国产乱码久久| 中文字幕在线不卡一区| 六月丁香婷婷久久| 在线欧美日韩精品|