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

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

?? group__cimg__loops.html

?? this a image processing program
?? HTML
?? 第 1 頁 / 共 2 頁
字號(hào):
<li>For all these loops, <code>x</code>,<code>y</code>,<code>z</code> and <code>v</code> are inner-defined variables only visible inside the scope of the loop. They don't have to be defined before the call of the macro.</li><li><code>img</code> must be a (non empty) <a class="el" href="structcimg__library_1_1_c_img.html">cimg_library::CImg</a> image.</li></ul><p>Here is an example of use that creates an image with a smooth color gradient : <div class="fragment"><pre class="fragment">  CImg&lt;unsigned char&gt; img(256,256,1,3);       <span class="comment">// Define a 256x256 color image</span>  cimg_forXYV(img,x,y,v) { img(x,y,v) = (x+y)*(v+1)/6; }  img.display(<span class="stringliteral">"Color gradient"</span>);</pre></div><h2><a class="anchor" name="lo5">Loops over interior regions and borders.</a></h2>Similar macros are also defined to loop only on the border of an image, or inside the image (excluding the border). The border may be several pixel wide :<p><ul><li><b>cimg_for_insideX(img,x,n)</b> : Loop along the x-axis, except for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_insideY(img,y,n)</b> : Loop along the y-axis, except for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_insideZ(img,z,n)</b> : Loop along the z-axis, except for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_insideV(img,v,n)</b> : Loop along the v-axis, except for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_insideXY(img,x,y,n)</b> : Loop along the (x,y)-axes, excepted for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_insideXYZ(img,x,y,z,n)</b> : Loop along the (x,y,z)-axes, excepted for pixels inside a border of <code>n</code> pixels wide.</li></ul><p>And also :<p><ul><li><b>cimg_for_borderX(img,x,n)</b> : Loop along the x-axis, only for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_borderY(img,y,n)</b> : Loop along the y-axis, only for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_borderZ(img,z,n)</b> : Loop along the z-axis, only for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_borderV(img,v,n)</b> : Loop along the z-axis, only for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_borderXY(img,x,y,n)</b> : Loop along the (x,y)-axes, only for pixels inside a border of <code>n</code> pixels wide.</li><li><b>cimg_for_borderXYZ(img,x,y,z,n)</b> : Loop along the (x,y,z)-axes, only for pixels inside a border of <code>n</code> pixels wide.</li></ul><p><ul><li>For all these loops, <code>x</code>,<code>y</code>,<code>z</code> and <code>v</code> are inner-defined variables only visible inside the scope of the loop. They don't have to be defined before the call of the macro.</li><li><code>img</code> must be a (non empty) <a class="el" href="structcimg__library_1_1_c_img.html">cimg_library::CImg</a> image.</li><li>The constant <code>n</code> stands for the size of the border.</li></ul><p>Here is an example of use, to create a 2d grayscale image with two different intensity gradients : <div class="fragment"><pre class="fragment">  CImg&lt;&gt; img(256,256);  cimg_for_insideXY(img,x,y,50) img(x,y) = x+y;  cimg_for_borderXY(img,x,y,50) img(x,y) = x-y;  img.display();</pre></div><h2><a class="anchor" name="lo6">Loops using neighborhoods.</a></h2>Inside an image loop, it is often useful to get values of neighborhood pixels of the current pixel at the loop location. The CImg Library provides a very smart and fast mechanism for this purpose, with the definition of several loop macros that remember the neighborhood values of the pixels. The use of these macros can highly optimize your code, and also simplify your program.<h3><a class="anchor" name="lo7">Neighborhood-based loops for 2D images</a></h3>For 2D images, the neighborhood-based loop macros are :<p><ul><li><b>cimg_for2x2(img,x,y,z,v,I)</b> : Loop along the (x,y)-axes using a centered 2x2 neighborhood.</li><li><b>cimg_for3x3(img,x,y,z,v,I)</b> : Loop along the (x,y)-axes using a centered 3x3 neighborhood.</li><li><b>cimg_for4x4(img,x,y,z,v,I)</b> : Loop along the (x,y)-axes using a centered 4x4 neighborhood.</li><li><b>cimg_for5x5(img,x,y,z,v,I)</b> : Loop along the (x,y)-axes using a centered 5x5 neighborhood.</li></ul><p>For all these loops, <code>x</code> and <code>y</code> are inner-defined variables only visible inside the scope of the loop. They don't have to be defined before the call of the macro. <code>img</code> is a non empty CImg&lt;T&gt; image. <code>z</code> and <code>v</code> are constants that define on which image slice and vector channel the loop must apply (usually both 0 for grayscale 2D images). Finally, <code>I</code> is the 2x2, 3x3, 4x4 or 5x5 neighborhood that will be updated with the correct pixel values during the loop (see <a class="el" href="group__cimg__loops.html#lo9">Defining neighborhoods</a>).<h3><a class="anchor" name="lo8">Neighborhood-based loops for 3D images</a></h3>For 3D images, the neighborhood-based loop macros are :<p><ul><li><b>cimg_for2x2x2(img,x,y,z,v,I)</b> : Loop along the (x,y,z)-axes using a centered 2x2x2 neighborhood.</li><li><b>cimg_for3x3x3(img,x,y,z,v,I)</b> : Loop along the (x,y,z)-axes using a centered 3x3x3 neighborhood.</li></ul><p>For all these loops, <code>x</code>, <code>y</code> and <code>z</code> are inner-defined variables only visible inside the scope of the loop. They don't have to be defined before the call of the macro. <code>img</code> is a non empty CImg&lt;T&gt; image. <code>v</code> is a constant that defines on which image channel the loop must apply (usually 0 for grayscale 3D images). Finally, <code>I</code> is the 2x2x2 or 3x3x3 neighborhood that will be updated with the correct pixel values during the loop (see <a class="el" href="group__cimg__loops.html#lo9">Defining neighborhoods</a>).<h3><a class="anchor" name="lo9">Defining neighborhoods</a></h3>The CImg library defines a neighborhood as a set of named <em>variables</em> or <em>references</em>, declared using specific CImg macros :<p><ul><li><b>CImg_2x2(I,type)</b> : Define a 2x2 neighborhood named <code>I</code>, of type <code>type</code>.</li><li><b>CImg_3x3(I,type)</b> : Define a 3x3 neighborhood named <code>I</code>, of type <code>type</code>.</li><li><b>CImg_4x4(I,type)</b> : Define a 4x4 neighborhood named <code>I</code>, of type <code>type</code>.</li><li><b>CImg_5x5(I,type)</b> : Define a 5x5 neighborhood named <code>I</code>, of type <code>type</code>.</li><li><b>CImg_2x2x2(I,type)</b> : Define a 2x2x2 neighborhood named <code>I</code>, of type <code>type</code>.</li><li><b>CImg_3x3x3(I,type)</b> : Define a 3x3x3 neighborhood named <code>I</code>, of type <code>type</code>.</li></ul><p>Actually, <code>I</code> is a <em>generic</em> <em>name</em> for the neighborhood. In fact, these macros declare a <em>set</em> of new variables. For instance, defining a 3x3 neighborhood <code>CImg_3x3(I,float)</code> declares 9 different float variables <code>Ipp</code>,<code>Icp</code>,<code>Inp</code>,<code>Ipc</code>,<code>Icc</code>,<code>Inc</code>,<code>Ipn</code>,<code>Icn</code>,<code>Inn</code> which correspond to each pixel value of a 3x3 neighborhood. Variable indices are <code>p</code>,<code>c</code> or <code>n</code>, and stand respectively for <em>'previous'</em>, <em>'current'</em> and <em>'next'</em>. First indice denotes the <code>x-axis</code>, second indice denotes the <code>y-axis</code>. Then, the names of the variables are directly related to the position of the corresponding pixels in the neighborhood. For 3D neighborhoods, a third indice denotes the <code>z-axis</code>. Then, inside a neighborhood loop, you will have the following equivalence :<ul><li><code>Ipp = img(x-1,y-1)</code></li><li><code>Icn = img(x,y+1)</code></li><li><code>Inp = img(x+1,y-1)</code></li><li><code>Inpc = img(x+1,y-1,z)</code></li><li><code>Ippn = img(x-1,y-1,z+1)</code></li><li>and so on...</li></ul><p>For bigger neighborhoods, such as 4x4 or 5x5 neighborhoods, two additionnal indices are introduced : <code>a</code> (stands for <em>'after'</em>) and <code>b</code> (stands for <em>'before'</em>), so that :<ul><li><code>Ibb = img(x-2,y-2)</code></li><li><code>Ina = img(x+1,y+2)</code></li><li>and so on...</li></ul><p>The value of a neighborhood pixel outside the image range (image border problem) is automatically set to the same values than the nearest valid pixel in the image (this is also called the <em>Neumann</em> <em>border</em> <em>condition</em>).<h3><a class="anchor" name="lo10">Neighborhood as a reference</a></h3>It is also possible to define neighborhood variables as references to classical C-arrays or CImg&lt;T&gt; images, instead of allocating new variables. This is done by adding <code>_ref</code> to the macro names used for the neighborhood definition :<p><ul><li><b>CImg_2x2_ref(I,type,tab)</b> : Define a 2x2 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li><li><b>CImg_3x3_ref(I,type,tab)</b> : Define a 3x3 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li><li><b>CImg_4x4_ref(I,type,tab)</b> : Define a 4x4 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li><li><b>CImg_5x5_ref(I,type,tab)</b> : Define a 5x5 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li><li><b>CImg_2x2x2_ref(I,type,tab)</b> : Define a 2x2x2 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li><li><b>CImg_3x3x3_ref(I,type,tab)</b> : Define a 3x3x3 neighborhood named <code>I</code>, of type <code>type</code>, as a reference to <code>tab</code>.</li></ul><p><code>tab</code> can be a one-dimensionnal C-style array, or a non empty <code>CImg&lt;T&gt;</code> image. Both objects must have same sizes as the considered neighborhoods.<h3><a class="anchor" name="lo11">Example codes</a></h3>More than a long discussion, the above example will demonstrate how to compute the gradient norm of a 3D volume using the <code>cimg_for3x3x3()</code> loop macro :<p><div class="fragment"><pre class="fragment">  CImg&lt;float&gt; volume(<span class="stringliteral">"IRM.hdr"</span>);        <span class="comment">// Load an IRM volume from an Analyze7.5 file</span>  CImg_3x3x3(I,<span class="keywordtype">float</span>);                  <span class="comment">// Define a 3x3x3 neighborhood</span>  CImg&lt;float&gt; gradnorm(volume);         <span class="comment">// Create an image with same size as 'volume'</span>  cimg_for3x3x3(volume,x,y,z,0,I) {     <span class="comment">// Loop over the volume, using the neighborhood I</span>    <span class="keyword">const</span> <span class="keywordtype">float</span> ix = 0.5f*(Incc-Ipcc);  <span class="comment">// Compute the derivative along the x-axis.</span>    <span class="keyword">const</span> <span class="keywordtype">float</span> iy = 0.5f*(Icnc-Icpc);  <span class="comment">// Compute the derivative along the y-axis.</span>    <span class="keyword">const</span> <span class="keywordtype">float</span> iz = 0.5f*(Iccn-Iccp);  <span class="comment">// Compute the derivative along the z-axis.</span>    gradnorm(x,y,z) = std::sqrt(ix*ix+iy*iy+iz*iz);  <span class="comment">// Set the gradient norm in the destination image</span>  }  gradnorm.display(<span class="stringliteral">"Gradient norm"</span>);</pre></div><p>And the following example shows how to deal with neighborhood references to blur a color image by averaging pixel values on a 5x5 neighborhood.<p><div class="fragment"><pre class="fragment">  CImg&lt;unsigned char&gt; src(<span class="stringliteral">"image_color.jpg"</span>), dest(src,<span class="keyword">false</span>), neighbor(5,5);  <span class="comment">// Image definitions.</span>  <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> uchar;             <span class="comment">// Avoid space in the second parameter of the macro CImg_5x5x1 below.</span>  CImg_5x5_ref(N,uchar,neighbor);          <span class="comment">// Define a 5x5 neighborhood as a reference to the 5x5 image neighbor.</span>  cimg_forV(src,k)                         <span class="comment">// Standard loop on color channels</span>     cimg_for5x5(src,x,y,0,k,N)            <span class="comment">// 5x5 neighborhood loop.</span>       dest(x,y,k) = neighbor.sum()/(5*5); <span class="comment">// Averaging pixels to filter the color image.</span>  CImgList&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>&gt; visu(src,dest);  visu.display("Original + Filtered");     <span class="comment">// Display both original and filtered image.</span></pre></div><p>Note that in this example, we didn't use directly the variables Nbb,Nbp,..,Ncc,... since there are only references to the neighborhood image <code>neighbor</code>. We rather used a member function of <code>neighbor</code>.<p>As you can see, explaining the use of the CImg neighborhood macros is actually more difficult than using them ! <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"><html>  <head>    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">    <title>The CImg Library - C++ Template Image Processing Library</title>    <meta content="David Tschumperle" name="author">    <link rel="shortcut icon" type="image/x-icon" href="http://cimg.sourceforge.net/favicon.ico" />    <link rel="icon" type="image/png" href="favicon.png" />    <link href="doxygen.css" rel="stylesheet" type="text/css">  </head>  <body bgcolor="#ffffff" fgcolor="#000000" alink="#ff0000" link="#0000ee" vlink="#551a8b">  <hr noshade="noshade" size="1" width="100%">    <a href="http://sourceforge.net">    <img src="http://sourceforge.net/sflogo.php?group_id=96492&amp;type=3" border="0" height="37" width="125"></a><!-- Start of StatCounter Code --><script type="text/javascript" language="javascript"><!-- var sc_project=895001; var sc_invisible=1; var sc_partition=7; var sc_security="5ea85181"; //--></script><script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c8.statcounter.com/counter.php?sc_project=895001&amp;java=0&amp;security=5ea85181&amp;invisible=1" alt="counter stats" border="0"></a> </noscript><!-- End of StatCounter Code -->  </body></html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷国产v国产偷v亚洲高清| 在线观看亚洲a| 精品第一国产综合精品aⅴ| 日本vs亚洲vs韩国一区三区| 日韩视频在线一区二区| 麻豆久久一区二区| 国产亚洲成av人在线观看导航| 久草精品在线观看| 亚洲国产激情av| 91国内精品野花午夜精品| 亚洲h精品动漫在线观看| 欧美一区二区免费视频| 国产综合久久久久久鬼色| 中文字幕乱码日本亚洲一区二区| 91免费版在线看| 日本欧美一区二区在线观看| 久久一二三国产| 本田岬高潮一区二区三区| 亚洲一区二区三区美女| 精品日韩一区二区三区免费视频| 国产精品综合av一区二区国产馆| 国产精品国产三级国产普通话99 | 欧美亚洲图片小说| 美国十次了思思久久精品导航| 久久精品免费在线观看| 在线看国产一区| 国产精品香蕉一区二区三区| 亚洲欧美视频在线观看视频| 91精品国产综合久久蜜臀| 成人免费毛片app| 日本网站在线观看一区二区三区| 国产日韩欧美精品一区| 在线一区二区三区| 国产一区二区不卡在线 | 亚洲国产精品国自产拍av| 在线免费精品视频| 国产精品白丝av| 亚洲一区二区欧美激情| 亚洲女人****多毛耸耸8| 欧美理论片在线| 91蜜桃免费观看视频| 精品午夜一区二区三区在线观看| 亚洲精品一二三| 国产无一区二区| 欧美一三区三区四区免费在线看| 99精品视频一区二区三区| 极品少妇xxxx偷拍精品少妇| 亚洲1区2区3区视频| 亚洲日本丝袜连裤袜办公室| 久久影视一区二区| 欧美一区二区三区视频| 欧美撒尿777hd撒尿| 成人av一区二区三区| 久久精品国产一区二区三区免费看| 亚洲一区二区三区国产| 亚洲激情自拍视频| 国产欧美1区2区3区| 日韩精品中文字幕一区二区三区 | 亚洲va韩国va欧美va| 亚洲色图视频网| 国产精品视频观看| 亚洲精品一区二区在线观看| 91精品国产综合久久久久久久久久 | 国产在线精品一区二区| 美国三级日本三级久久99| 亚洲成人动漫一区| 亚洲午夜免费视频| 亚洲一区二区三区自拍| 亚洲精品免费一二三区| 亚洲免费在线视频一区 二区| 国产精品久久午夜夜伦鲁鲁| 欧美国产视频在线| 欧美激情一区二区在线| 久久久国产精华| 久久久精品综合| 国产精品色哟哟| 国产精品沙发午睡系列990531| 国产日韩精品一区| 国产精品另类一区| 国产精品国产a级| 午夜激情一区二区三区| 亚洲夂夂婷婷色拍ww47| 亚洲一区二区视频| 日韩高清电影一区| 精品一区二区三区在线观看| 国产一区激情在线| 粉嫩av一区二区三区| aaa欧美色吧激情视频| 色94色欧美sute亚洲13| 欧美日韩一区二区三区四区| 91精品蜜臀在线一区尤物| 日韩美女一区二区三区四区| www欧美成人18+| 国产精品理论在线观看| 亚洲免费观看高清完整版在线 | 东方aⅴ免费观看久久av| 99精品桃花视频在线观看| 91丨国产丨九色丨pron| 欧美性色黄大片手机版| 日韩美女在线视频| 国产精品美日韩| 洋洋成人永久网站入口| 日产国产欧美视频一区精品| 国产高清成人在线| 色呦呦网站一区| 日韩精品一区二区三区老鸭窝| 中文字幕av不卡| 亚洲成人激情社区| 久久www免费人成看片高清| 国产成人超碰人人澡人人澡| 91官网在线免费观看| 欧美一级在线免费| 国产精品网站一区| 亚洲成a人在线观看| 捆绑紧缚一区二区三区视频| 成人免费视频app| 在线播放视频一区| 亚洲国产精品v| 日韩精品电影在线| 粉嫩av一区二区三区| 欧美日韩国产一区二区三区地区| 欧美va亚洲va国产综合| 亚洲欧美激情插| 激情综合色丁香一区二区| 色综合久久综合网| 久久免费视频色| 亚洲成人自拍网| caoporen国产精品视频| 日韩三级在线观看| 亚洲一二三四久久| 成人综合婷婷国产精品久久免费| 欧美日韩亚洲国产综合| 综合自拍亚洲综合图不卡区| 久久91精品久久久久久秒播| 色系网站成人免费| 国产女人aaa级久久久级| 婷婷国产v国产偷v亚洲高清| 97久久超碰国产精品电影| 久久久噜噜噜久久中文字幕色伊伊| 香蕉影视欧美成人| 91婷婷韩国欧美一区二区| 久久久国产精品午夜一区ai换脸| 视频在线在亚洲| 色噜噜狠狠色综合欧洲selulu| 国产亚洲一区字幕| 久久 天天综合| 欧美精品 国产精品| 亚洲自拍偷拍麻豆| 色婷婷av一区二区| 中文字幕一区三区| 国产成人午夜精品影院观看视频 | 成人一区二区视频| 久久婷婷一区二区三区| 久久精品国产成人一区二区三区| 欧美日韩五月天| 亚洲一区二区五区| 91福利社在线观看| 亚洲综合一区在线| 欧洲一区二区三区在线| 伊人色综合久久天天| 从欧美一区二区三区| 久久久精品免费免费| 99久久国产综合精品女不卡| 国产精品色噜噜| zzijzzij亚洲日本少妇熟睡| 欧美激情一区二区三区全黄| 国产精品综合一区二区三区| 久久视频一区二区| 精品无码三级在线观看视频| 精品日韩欧美一区二区| 麻豆精品久久久| 久久久久久亚洲综合影院红桃 | 日本欧洲一区二区| 欧美一级理论片| 毛片一区二区三区| 精品国产91久久久久久久妲己| 国产一区二区三区香蕉| 国产日本欧美一区二区| jlzzjlzz亚洲日本少妇| 综合久久久久综合| 欧美日韩免费一区二区三区视频| 首页欧美精品中文字幕| 欧美大白屁股肥臀xxxxxx| 国产一区在线观看视频| 国产精品嫩草久久久久| 欧美在线影院一区二区| 日日骚欧美日韩| 久久这里只有精品视频网| 丁香六月久久综合狠狠色| 亚洲精品成人天堂一二三| 欧美日韩激情一区二区| 久久97超碰色| 最新不卡av在线| 正在播放一区二区| 国产在线精品一区二区三区不卡 | 不卡视频一二三| 一区二区欧美视频| 欧美日韩三级在线| 日本aⅴ免费视频一区二区三区| 精品成人佐山爱一区二区|