1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>The standard libraries</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
<!-- 3,html -->
<meta name="src" content="nipguide.tex">
<link rel="stylesheet" type="text/css" href="nipguide.css">
</head><body
>
<!--l. 963--><div class="crosslinks"><p class="noindent">[<a
href="nipguidese33.html" >next</a>] [<a
href="nipguidese30.html" >prev</a>] [<a
href="nipguidese30.html#tailnipguidese30.html" >prev-tail</a>] [<a
href="nipguidese30.html#tailnipguidese31.html">tail</a>] [<a
href="nipguidech6.html#nipguidese32.html" >up</a>] </p></div>
<h3 class="sectionHead"><span class="titlemark">6.10 </span> <a
id="x42-740006.10"></a>The standard libraries</h3>
<!--l. 965--><p class="noindent" ><span
class="phvr7t-x-x-80">nip2 </span>comes with a lot of little utility functions. The functions
for list processing are listed in Table <a
href="#x39-710013">6.3<!--tex4ht:ref: tb:list --></a>. There are a huge
number more, too many to really list here. Table <a
href="#x42-740014">6.4<!--tex4ht:ref: tb:toolkits --></a> lists all
the utility toolkits with some hints about the kinds of
function they contain. Read the (heavily commented)
toolkits for details.
<!--l. 972--><p class="indent" > <a
id="x42-740014"></a><hr class="float"><div class="float"
>
<div class="center"
>
<!--l. 972--><p class="noindent" >
<div class="tabular"> <table id="TBL-6" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-6-1g"><col
id="TBL-6-1"></colgroup><colgroup id="TBL-6-2g"><col
id="TBL-6-2"></colgroup><colgroup id="TBL-6-3g"><col
id="TBL-6-3"></colgroup><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-1-1"
class="td11">Toolkit </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-1-2"
class="td11">Contains </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-1-3"
class="td11">Description </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-2-1"
class="td11"><span
class="phvr7t-x-x-80">_convert </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-2-2"
class="td11"><span
class="phvr7t-x-x-80">parse</span><span
class="phvr7t-x-x-80">_int l</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-2-3"
class="td11">convert ascii text to numbers </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-3-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-3-2"
class="td11"><span
class="phvr7t-x-x-80">to</span><span
class="phvr7t-x-x-80">_matrix x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-3-3"
class="td11">convert anything into a matrix </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-4-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-4-2"
class="td11"><span
class="phvr7t-x-x-80">colour</span><span
class="phvr7t-x-x-80">_transform</span><span
class="phvr7t-x-x-80">_to to x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-4-3"
class="td11">convert between colour spaces </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-5-1"
class="td11"><span
class="phvr7t-x-x-80">_generate </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-5-2"
class="td11"><span
class="phvr7t-x-x-80">image</span><span
class="phvr7t-x-x-80">_new w h ... </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-5-3"
class="td11">make a blank image </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-6-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-6-2"
class="td11"><span
class="phvr7t-x-x-80">image</span><span
class="phvr7t-x-x-80">_white i </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-6-3"
class="td11">look at image <span
class="phvr7t-x-x-80">i</span>, try to guess what white is </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-7-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-7-2"
class="td11"><span
class="phvr7t-x-x-80">make</span><span
class="phvr7t-x-x-80">_xy w h </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-7-3"
class="td11">make an image of size <span
class="phvr7t-x-x-80">w </span>by <span
class="phvr7t-x-x-80">h </span>whose pixel value are</td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-8-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-8-2"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-8-3"
class="td11">their coordinates </td></tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-9-1"
class="td11"><span
class="phvr7t-x-x-80">_types </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-9-2"
class="td11"><span
class="phvr7t-x-x-80">Image i </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-9-3"
class="td11">all the standard classes and support functions,</td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-10-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-10-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-10-2"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-10-3"
class="td11">see <span
class="cmsy-10"></span><a
href="nipguidese34.html#x45-860006.13">6.13<!--tex4ht:ref: sec:object --></a> </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-11-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-11-1"
class="td11"><span
class="phvr7t-x-x-80">_predicate</span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-11-2"
class="td11"><span
class="phvr7t-x-x-80">is</span><span
class="phvr7t-x-x-80">_colour</span><span
class="phvr7t-x-x-80">_space i </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-11-3"
class="td11">test for objects are in various categories or have </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-12-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-12-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-12-2"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-12-3"
class="td11">various properties </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-13-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-13-1"
class="td11"><span
class="phvr7t-x-x-80">_stdenv </span></td><td style="white-space:nowrap; text-align:left;" id="TBL-6-13-2"
class="td11"><span
class="phvr7t-x-x-80">logical</span><span
class="phvr7t-x-x-80">_and x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-13-3"
class="td11">function versions of all the operators </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-14-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-14-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-14-2"
class="td11"><span
class="phvr7t-x-x-80">bandsplit i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-14-3"
class="td11">break up and recombine images by band </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-15-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-15-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-15-2"
class="td11"><span
class="phvr7t-x-x-80">mean x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-15-3"
class="td11">statistical ops on objects </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-16-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-16-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-16-2"
class="td11"><span
class="phvr7t-x-x-80">transpose x</span>, <span
class="phvr7t-x-x-80">flipud x</span>, <span
class="phvr7t-x-x-80">rot90 x</span>, …</td><td style="white-space:nowrap; text-align:left;" id="TBL-6-16-3"
class="td11">flips, rotates, etc. on objects </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-17-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-17-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-17-2"
class="td11"><span
class="phvr7t-x-x-80">rad x</span>, <span
class="phvr7t-x-x-80">pi</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-17-3"
class="td11">trigonometry stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-18-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-18-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-18-2"
class="td11"><span
class="phvr7t-x-x-80">sign x</span>, <span
class="phvr7t-x-x-80">conj x</span>, <span
class="phvr7t-x-x-80">polar x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-18-3"
class="td11">complex stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-19-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-19-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-19-2"
class="td11"><span
class="phvr7t-x-x-80">rint x</span>, <span
class="phvr7t-x-x-80">ceil x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-19-3"
class="td11">various rounding things </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-20-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-20-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-20-2"
class="td11"><span
class="phvr7t-x-x-80">fwfft x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-20-3"
class="td11">fourier stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-21-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-21-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-21-2"
class="td11"><span
class="phvr7t-x-x-80">dilate m x</span>, <span
class="phvr7t-x-x-80">rank w h n i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-21-3"
class="td11">morphology stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-22-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-22-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-22-2"
class="td11"><span
class="phvr7t-x-x-80">conv m x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-22-3"
class="td11">convolution stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-23-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-23-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-23-2"
class="td11"><span
class="phvr7t-x-x-80">image</span><span
class="phvr7t-x-x-80">_set</span><span
class="phvr7t-x-x-80">_type t i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-23-3"
class="td11">set various image header field </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-24-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-24-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-24-2"
class="td11"><span
class="phvr7t-x-x-80">resize x y i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-24-3"
class="td11">resampling images </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-25-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-25-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-25-2"
class="td11"><span
class="phvr7t-x-x-80">recomb m i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-25-3"
class="td11">recombinations </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-26-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-26-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-26-2"
class="td11"><span
class="phvr7t-x-x-80">clip2fmt f i</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-26-3"
class="td11">format conversions </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-27-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-27-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-27-2"
class="td11"><span
class="phvr7t-x-x-80">hist</span><span
class="phvr7t-x-x-80">_find m x</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-27-3"
class="td11">histogram stuff </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-28-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-28-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-28-2"
class="td11"><span
class="phvr7t-x-x-80">id x</span>, <span
class="phvr7t-x-x-80">const x y</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-28-3"
class="td11">various useful operations on functions </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-6-29-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-29-1"
class="td11"> </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-29-2"
class="td11"><span
class="phvr7t-x-x-80">map</span><span
class="phvr7t-x-x-80">_binary fn x y</span>, … </td><td style="white-space:nowrap; text-align:left;" id="TBL-6-29-3"
class="td11">mapping over groups </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-6-30-"><td style="white-space:nowrap; text-align:left;" id="TBL-6-30-1"
class="td11"> </td></tr></table></div></div>
<br /><div class="caption"
><span class="id">Table 6.4: </span><span
class="content">Useful utility functions — see the source for details</span></div><!--tex4ht:label?: x42-740014 -->
<!--l. 1042--><p class="noindent" ><a name="nip_label_tb:toolkits"></a>
</div><hr class="endfloat" />
<!--l. 1045--><div class="crosslinks"><p class="noindent">[<a
href="nipguidese33.html" >next</a>] [<a
href="nipguidese30.html" >prev</a>] [<a
href="nipguidese30.html#tailnipguidese30.html" >prev-tail</a>] [<a
href="nipguidese31.html" >front</a>] [<a
href="nipguidech6.html#nipguidese32.html" >up</a>] </p></div>
<!--l. 1045--><p class="indent" > <a
id="tailnipguidese31.html"></a>
</body></html>
|