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

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

?? mcf_levelsets3d.cpp

?? this a image processing program
?? CPP
字號:
/*-------------------------------------------------------------------------------------------    File        : mcf_levelsets3D.cpp  Description : Implementation of the Mean Curvature Flow on Surfaces                using the framework of Level Sets 3D.  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.-----------------------------------------------------------------------------------------*/#include "../CImg.h"using namespace cimg_library;// The undef below is necessary when using a non-standard compiler.#ifdef cimg_use_visualcpp6#define std#endif// Apply the 3D Eikonal PDE used to init and re-init distance function//---------------------------------------------------------------------template<typename T> CImg<T>& eikonal_PDE(CImg<T>& img, const unsigned int nb_iter=10,		     const float dt=1, const float narrow=4.0f) {  CImg<T> veloc(img.dimx(),img.dimy(),img.dimz(),img.dimv());  CImg_3x3x3(I,float);  for (unsigned int iter=0; iter<nb_iter; iter++) {    cimg_for3x3x3(img,x,y,z,0,I) if (cimg::abs(Iccc)<narrow && Iccc*Incc>0 && Iccc*Ipcc>0 && Iccc*Icnc>0 && Iccc*Icpc>0 && Iccc*Iccp>0 && Iccc*Iccn>0) {      const float	gx = 0.5f*(Incc-Ipcc),	gy = 0.5f*(Icnc-Icpc),	gz = 0.5f*(Iccn-Iccp),	sgn = -(float)cimg::sign(Iccc),	ix = (gx*sgn)>0?(Incc-Iccc):(Iccc-Ipcc),	iy = (gy*sgn)>0?(Icnc-Iccc):(Iccc-Icpc),	iz = (gz*sgn)>0?(Iccn-Iccc):(Iccc-Iccp),	ng = (float)std::sqrt(gx*gx+gy*gy+gz*gz),	ngx = ng>1e-5f?gx/ng:0,	ngy = ng>1e-5f?gy/ng:0,	ngz = ng>1e-5f?gz/ng:0;      veloc(x,y,z) = (T)sgn*(ngx*ix + ngy*iy + ngz*iz - 1);    } else veloc(x,y,z) = 0;    const CImgStats stats(veloc,false);    const double xdt = dt/cimg::max(cimg::abs(stats.min),cimg::abs(stats.max));    img+=xdt*veloc;  }  return img;}// Apply the Mean curvature flow PDE//-----------------------------------template<typename T> CImg<T>& mcf_PDE(CImg<T>& img, const unsigned int nb_iter,				      const float dt=0.25f, const float narrow=4.0f) {  CImg<T> veloc(img.dimx(),img.dimy(),img.dimz(),img.dimv());  CImg_3x3x3(I,float);  for (unsigned int iter=0; iter<nb_iter; iter++) {    cimg_for3x3x3(img,x,y,z,0,I) if (cimg::abs(Iccc)<narrow) {      const float	ix = 0.5f*(Incc-Ipcc),	iy = 0.5f*(Icnc-Icpc),	iz = 0.5f*(Iccn-Iccp),	norm = (float)std::sqrt(1e-5f+ix*ix+iy*iy+iz*iz),	ixx = Incc+Ipcc-2*Iccc,	ixy = 0.25f*(Ippc+Innc-Inpc-Ipnc),	ixz = 0.25f*(Ipcp+Incn-Incp-Ipcn),	iyy = Icnc+Icpc-2*Iccc,		iyz = 0.25f*(Icpp+Icnn-Icnp-Icpn),	izz = Iccn+Iccp-2*Iccc,	a = ix/norm,	b = iy/norm,	c = iz/norm,	inn = a*a*ixx + b*b*iyy + c*c*izz + 2*a*b*ixy + 2*a*c*ixz + 2*b*c*iyz;      veloc(x,y,z) = ixx+iyy+izz-inn;    } else veloc(x,y,z) = 0;    const CImgStats stats(veloc,false);    const double xdt = dt/cimg::max(cimg::abs(stats.min),cimg::abs(stats.max));    img+=xdt*veloc;  }  return img;}// Main procedure//----------------int main(int argc,char **argv) {  cimg_usage("Mean curvature flow of a surface, using 3D level sets");  const char *file_i = cimg_option("-i",(char*)0,"Input image");  const float dt = cimg_option("-dt",0.05f,"PDE Time step");  const float narrow = cimg_option("-band",5.0f,"Size of the narrow band");  const bool show = cimg_option("-both",false,"Show both evolving and initial surface");  // Define the signed distance map of the initial surface  CImg<> img;  if (file_i) {    const float sigma = cimg_option("-sigma",1.2f,"Segmentation regularity");    const float alpha = cimg_option("-alpha",5.0f,"Region growing tolerance");    img.load(file_i).channel(0);    int s[6]; s[0]=-1;    CImgDisplay disp(img,"Please select a starting point");    while (s[0]<0) img.feature_selection(s,0,disp);    CImg<> region;    float tmp[1]={0};    img.draw_fill(s[0],s[1],s[2],tmp,region,alpha);    ((img = region.normalize(-1,1))*=-1).blur(sigma);      }  else { // Create synthetic implicit function    img.assign(60,60,60);    const float exte[1]={1}, inte[1]={-1};    img.fill(*exte).draw_rectangle(15,15,15,45,45,45,inte).draw_rectangle(25,25,0,35,35,img.dimz()-1,exte).      draw_rectangle(0,25,25,img.dimx()-1,35,35,exte).draw_rectangle(25,0,25,35,img.dimy()-1,35,exte);  }  eikonal_PDE(img,10,0.1f);  // Compute corresponding surface triangularization by the marching cube algorithm (isovalue 0)  CImgList<> points0;  CImgList<unsigned int> faces0;  if (show) img.marching_cubes(0,points0,faces0);  const CImgList<unsigned char> colors0(faces0.size,CImg<unsigned char>::vector(100,200,255));  const CImgList<> opacities0(faces0.size,1,1,1,1,0.2f);  // Perform MCF evolution  CImgDisplay disp(256,256,""), disp3d(512,512,"",0,2);  float alpha = 0, beta = 0;  for (unsigned int iter=0; !disp.is_closed && !disp3d.is_closed && disp.key!=cimg::keyESC && disp3d.key!=cimg::keyESC &&	 disp.key!=cimg::keyQ && disp3d.key!=cimg::keyQ; iter++) {    disp.set_title("3D implicit Function (iter. %u)",iter);    disp3d.set_title("Mean curvature flow 3D - Isosurface (iter. %u)",iter);        // Apply PDE on the distance function    mcf_PDE(img,1,dt,narrow);                       // Do one iteration of mean curvature flow    if (!(iter%10)) eikonal_PDE(img,1,0.5f,narrow); // Every 10 steps, do one iteration of distance function re-initialization            // Compute surface triangularization by the marching cube algorithm (isovalue 0)    CImgList<> points(points0), opacities(opacities0);    CImgList<unsigned int> faces(faces0);    CImgList<unsigned char> colors(colors0);    img.marching_cubes(0,points,faces);    opacities.insert(faces.size-colors.size,CImg<>::vector(1.0f));    colors.insert(faces.size-colors.size,CImg<unsigned char>::vector(200,128,100));    const float fact = 3*cimg::max(disp3d.dimx(),disp3d.dimy())/(4.0f*cimg::max(img.dimx(),img.dimy()));    cimglist_for(points,l) { // center and rescale the object      points[l](0)=(points[l](0)-img.dimx()/2)*fact;      points[l](1)=(points[l](1)-img.dimy()/2)*fact;      points[l](2)=(points[l](2)-img.dimz()/2)*fact;     }    // Display 3D object on the display window.    CImg<unsigned char> visu(disp3d.dimx(),disp3d.dimy(),1,3,0);    const CImg<> rot = CImg<>::rotation_matrix(1,0,0,(beta+=0.01f))*CImg<>::rotation_matrix(0,1,1,(alpha+=0.05f));    cimglist_for(points,ll) points[ll] = rot*points[ll];         visu.draw_object3d(visu.dimx()/2.0f,visu.dimy()/2.0f,0.0f,		       points,faces,colors,opacities,3,		       false,500.0,0.0f,0.0f,-8000.0f,0.02f).display(disp3d);    img.display(disp.wait(20));    if (disp3d.button || disp3d.key) {       unsigned char white[3]={ 255,255,255 };      visu.fill(0).draw_text("Time stopped, press any key to start again",10,10,white).	display_object3d(points,faces,colors,opacities,disp3d);      disp3d.key = 0;     }    if (disp.is_resized)   disp.resize(false);    if (disp3d.is_resized) disp3d.resize(false);  }    // Exit      return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大片顶级少妇| 国产精品免费看片| 91片在线免费观看| 天堂一区二区在线| 中文字幕亚洲欧美在线不卡| 欧美大胆一级视频| 欧美日韩小视频| av一本久道久久综合久久鬼色| 麻豆中文一区二区| 亚洲一区二区三区四区五区黄| 欧美激情一区二区三区四区| 欧美不卡视频一区| 欧美日韩国产高清一区| 色综合天天性综合| 国产一二三精品| 久久精品国产澳门| 日韩黄色小视频| 亚洲一区在线观看免费| 亚洲色图第一区| 亚洲国产精品精华液ab| www国产精品av| 欧美一区二区三区成人| 欧美亚洲精品一区| 色激情天天射综合网| 成人福利在线看| 国产成人h网站| 国产精品99精品久久免费| 另类小说欧美激情| 蜜桃在线一区二区三区| 日韩av一区二| 日本在线不卡一区| 视频一区二区中文字幕| 亚洲成a人v欧美综合天堂| 亚洲愉拍自拍另类高清精品| 亚洲欧美精品午睡沙发| 亚洲黄色小视频| 亚洲午夜免费电影| 亚洲伊人色欲综合网| 亚洲3atv精品一区二区三区| 亚洲成年人网站在线观看| 日韩电影在线免费看| 亚洲成人av一区二区三区| 亚洲成av人片在www色猫咪| 亚洲制服丝袜av| 日韩福利电影在线| 三级在线观看一区二区| 蜜臀av在线播放一区二区三区| 免费欧美日韩国产三级电影| 久久超碰97中文字幕| 国产尤物一区二区| 大胆亚洲人体视频| 色哟哟一区二区在线观看 | 91福利精品视频| 欧美这里有精品| 69久久夜色精品国产69蝌蚪网| 日韩一级完整毛片| 久久中文字幕电影| 中文字幕亚洲区| 亚洲国产aⅴ成人精品无吗| 热久久一区二区| 国产丶欧美丶日本不卡视频| 91视频91自| 欧美日韩免费不卡视频一区二区三区| 91.com视频| 久久先锋资源网| 亚洲色图另类专区| 人人精品人人爱| 国产高清不卡二三区| 在线精品视频一区二区三四| 91精品国产综合久久婷婷香蕉| 26uuu亚洲婷婷狠狠天堂| 国产精品少妇自拍| 亚洲一区二区av在线| 精品一区精品二区高清| av电影在线观看一区| 欧美精品久久天天躁| 国产婷婷色一区二区三区 | 国产欧美日韩麻豆91| 艳妇臀荡乳欲伦亚洲一区| 蜜臀精品久久久久久蜜臀| 大美女一区二区三区| 欧美嫩在线观看| 欧美—级在线免费片| 日韩精彩视频在线观看| av中文字幕在线不卡| 91麻豆精品国产91久久久久| 国产精品色在线观看| 日韩国产欧美一区二区三区| 成人免费毛片高清视频| 91精品国产欧美日韩| 成人免费在线视频观看| 久久99精品国产91久久来源| 91视频观看免费| 2020国产精品久久精品美国| 亚洲欧美经典视频| 国产成人久久精品77777最新版本| 欧美日韩一区三区四区| 国产精品天美传媒| 蜜桃视频一区二区| 欧美在线视频全部完| 国产视频一区不卡| 秋霞电影网一区二区| 在线观看91视频| 国产精品午夜电影| 国产一区二区福利| 欧美肥妇毛茸茸| 亚洲成人精品一区| 一本色道久久综合狠狠躁的推荐| 国产欧美一区二区三区鸳鸯浴 | 激情综合色综合久久综合| 欧美日韩一区小说| 亚洲欧美激情一区二区| 国产成人av影院| 26uuu色噜噜精品一区二区| 日本特黄久久久高潮| 欧美日韩大陆在线| 亚洲一区二区三区不卡国产欧美| av爱爱亚洲一区| 国产精品高潮呻吟久久| 国产不卡视频在线观看| 久久久久久久电影| 韩国精品主播一区二区在线观看 | www久久精品| 美脚の诱脚舐め脚责91| 欧美老肥妇做.爰bbww| 亚洲综合在线第一页| 色94色欧美sute亚洲线路二| 成人欧美一区二区三区1314| 成人精品视频一区| 国产精品久久久久久久久晋中 | av午夜精品一区二区三区| 国产日韩精品一区| 国产成人自拍高清视频在线免费播放| 精品国产乱码久久久久久影片| 久久成人羞羞网站| 久久人人97超碰com| 国产一区二区三区在线观看免费 | 色综合av在线| 亚洲激情综合网| 欧美色图激情小说| 性做久久久久久免费观看欧美| 欧美日韩精品一区二区天天拍小说 | 精品成人一区二区三区| 久久精品国产网站| 国产日韩精品一区| 99久久99久久综合| 亚洲亚洲精品在线观看| 91精品国产综合久久久蜜臀粉嫩| 日本女优在线视频一区二区| 欧美tickling网站挠脚心| 韩国一区二区视频| 国产日韩亚洲欧美综合| 94-欧美-setu| 亚州成人在线电影| 精品国内二区三区| 成人av电影免费观看| 亚洲精品欧美激情| 欧美一区二区三区日韩视频| 国产一区二三区好的| 国产精品久久久久影视| 欧美综合亚洲图片综合区| 日本不卡一区二区三区| 久久影院午夜片一区| 97国产精品videossex| 亚洲成年人网站在线观看| 欧美精品一区二区三区很污很色的| 国产成人精品免费看| 艳妇臀荡乳欲伦亚洲一区| 欧美v亚洲v综合ⅴ国产v| av一区二区久久| 日韩av一级电影| 国产精品久久久久永久免费观看| 欧洲av一区二区嗯嗯嗯啊| 黑人巨大精品欧美黑白配亚洲| 亚洲美女屁股眼交3| 欧美一区二区三区日韩视频| 不卡一区二区在线| 日本少妇一区二区| 亚洲视频香蕉人妖| 日韩午夜在线观看视频| 91在线观看视频| 久久精品国产99| 亚洲精品大片www| 精品日韩一区二区| 日本精品裸体写真集在线观看| 国产综合色产在线精品| 亚洲国产视频网站| 国产精品无遮挡| 日韩一区二区电影| 日本乱码高清不卡字幕| 狠狠色狠狠色合久久伊人| 亚洲综合色自拍一区| 国产三级欧美三级日产三级99| 91久久久免费一区二区| 国产成人精品亚洲日本在线桃色| 图片区小说区区亚洲影院| 国产精品传媒在线| 久久美女高清视频| 欧美丰满少妇xxxbbb| 91女人视频在线观看|