/usr/share/doc/libcpl-dev/html/group__cpl__geom__img.html is in libcpl-doc 7.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>Common Pipeline Library Reference Manual: High level functions for geometric transformations</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="cpl.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Common Pipeline Library Reference Manual
 <span id="projectnumber">7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">High level functions for geometric transformations</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga91f5d0da222fcce4d019f2d241cc20f8"><td class="memItemLeft" align="right" valign="top">cpl_image ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__geom__img.html#ga91f5d0da222fcce4d019f2d241cc20f8">cpl_geom_img_offset_combine</a> (const cpl_imagelist *self, const cpl_bivector *offs, int refine, const cpl_bivector *aperts, const cpl_vector *sigmas, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *pisigma, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> s_hx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> s_hy, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> m_hx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> m_hy, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> min_rej, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> max_rej, cpl_geom_combine union_flag)</td></tr>
<tr class="memdesc:ga91f5d0da222fcce4d019f2d241cc20f8"><td class="mdescLeft"> </td><td class="mdescRight">Images list recombination. <a href="#ga91f5d0da222fcce4d019f2d241cc20f8">More...</a><br /></td></tr>
<tr class="separator:ga91f5d0da222fcce4d019f2d241cc20f8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga135df3510913add18d5550a8aa356923"><td class="memItemLeft" align="right" valign="top">cpl_bivector * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923">cpl_geom_img_offset_fine</a> (const cpl_imagelist *ilist, const cpl_bivector *estimates, const cpl_bivector *anchors, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> s_hx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> s_hy, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> m_hx, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> m_hy, cpl_vector *correl)</td></tr>
<tr class="memdesc:ga135df3510913add18d5550a8aa356923"><td class="mdescLeft"> </td><td class="mdescRight">Get the offsets by correlating the images. <a href="#ga135df3510913add18d5550a8aa356923">More...</a><br /></td></tr>
<tr class="separator:ga135df3510913add18d5550a8aa356923"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8df5c11aeb84394817af6a0680c2859c"><td class="memItemLeft" align="right" valign="top">cpl_image ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__geom__img.html#ga8df5c11aeb84394817af6a0680c2859c">cpl_geom_img_offset_saa</a> (const cpl_imagelist *ilist, const cpl_bivector *offs, cpl_kernel kernel, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> rejmin, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> rejmax, cpl_geom_combine union_flag, double *ppos_x, double *ppos_y)</td></tr>
<tr class="memdesc:ga8df5c11aeb84394817af6a0680c2859c"><td class="mdescLeft"> </td><td class="mdescRight">Shift and add an images list to a single image. <a href="#ga8df5c11aeb84394817af6a0680c2859c">More...</a><br /></td></tr>
<tr class="separator:ga8df5c11aeb84394817af6a0680c2859c"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module contains functions to compute the shift-and-add operation on an image list.</p>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include "cpl_geom_img.h"</span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga91f5d0da222fcce4d019f2d241cc20f8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_image** cpl_geom_img_offset_combine </td>
<td>(</td>
<td class="paramtype">const cpl_imagelist * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_bivector * </td>
<td class="paramname"><em>offs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>refine</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_bivector * </td>
<td class="paramname"><em>aperts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_vector * </td>
<td class="paramname"><em>sigmas</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> * </td>
<td class="paramname"><em>pisigma</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>s_hx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>s_hy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>m_hx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>m_hy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>min_rej</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>max_rej</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_geom_combine </td>
<td class="paramname"><em>union_flag</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Images list recombination. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Input imagelist - with refining images may be erased </td></tr>
<tr><td class="paramname">offs</td><td>List of offsets in x and y </td></tr>
<tr><td class="paramname">refine</td><td>Iff non-zero, the offsets will be refined </td></tr>
<tr><td class="paramname">aperts</td><td>List of correlation apertures or NULL if unknown </td></tr>
<tr><td class="paramname">sigmas</td><td>Positive, decreasing sigmas to apply </td></tr>
<tr><td class="paramname">pisigma</td><td>Index of the sigma that was used or undefined on error </td></tr>
<tr><td class="paramname">s_hx</td><td>Search area half-width. </td></tr>
<tr><td class="paramname">s_hy</td><td>Search area half-height. </td></tr>
<tr><td class="paramname">m_hx</td><td>Measurement area half-width. </td></tr>
<tr><td class="paramname">m_hy</td><td>Measurement area half-height. </td></tr>
<tr><td class="paramname">min_rej</td><td>number of low values to reject in stacking </td></tr>
<tr><td class="paramname">max_rej</td><td>number of high values to reject in stacking </td></tr>
<tr><td class="paramname">union_flag</td><td>Combination mode (CPL_GEOM_UNION or CPL_GEOM_INTERSECT) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly allocated images array, or NULL on error. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__geom__img.html#ga8df5c11aeb84394817af6a0680c2859c" title="Shift and add an images list to a single image. ">cpl_geom_img_offset_saa()</a> </dd>
<dd>
<a class="el" href="group__cpl__apertures.html#gab5609d48472fa576591e42868b7d8a52" title="Simple detection of apertures in an image. ">cpl_apertures_extract()</a> </dd>
<dd>
<a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923" title="Get the offsets by correlating the images. ">cpl_geom_img_offset_fine()</a></dd></dl>
<p>With offset refinement enabled: This function detects cross correlation points in the first image (if not provided by the user), use them to refine the provided offsets with a cross correlation method, and then apply the shift and add to recombine the images together. Non-correlating images are removed from self.</p>
<p>Without offset refinement self is not modified.</p>
<p>The supported types are CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT.</p>
<p>The number of provided offsets shall be equal to the number of input images. The ith offset (offs_x, offs_y) is the offset that has to be used to shift the ith image to align it on the first one.</p>
<p>sigmas may be NULL if offset refinement is disabled or if aperts is non-NULL.</p>
<p>On success the returned image array contains 2 images:</p><ul>
<li>the combined image</li>
<li>the contribution map</li>
</ul>
<p>The returned cpl_image array must be deallocated like this: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> if (array != NULL) {</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>  cpl_image_delete(array[0]);</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  cpl_image_delete(array[1]);</div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>  cpl_free(array);</div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> }</div>
</div><!-- fragment --><p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if self or offs is NULL, or if sigmas is NULL with refinement enabled and aperts NULL.</li>
<li>CPL_ERROR_ILLEGAL_INPUT if self is not uniform</li>
<li>CPL_ERROR_INCOMPATIBLE_INPUT if self and offs have different sizes</li>
<li>CPL_ERROR_DATA_NOT_FOUND if the shift and add of the images fails </li>
</ul>
<p>References <a class="el" href="group__cpl__apertures.html#gaae76b7d276ff9457bf8b0b5afa14f5df">cpl_apertures_delete()</a>, <a class="el" href="group__cpl__apertures.html#gab5609d48472fa576591e42868b7d8a52">cpl_apertures_extract()</a>, <a class="el" href="group__cpl__apertures.html#ga82d10792f91f7065eb026289be126c64">cpl_apertures_get_pos_x()</a>, <a class="el" href="group__cpl__apertures.html#gac9bc0b6dc953d2c328815215ea535def">cpl_apertures_get_pos_y()</a>, <a class="el" href="group__cpl__apertures.html#ga47f4aabc5c4784407c8a715c46b4e6a0">cpl_apertures_sort_by_npix()</a>, <a class="el" href="group__cpl__bivector.html#gab49cf8bcea934646b96a4d4e476d7e54">cpl_bivector_delete()</a>, <a class="el" href="group__cpl__bivector.html#ga7b84e7673a8ea5ae32fb8161202e2f48">cpl_bivector_get_size()</a>, <a class="el" href="group__cpl__bivector.html#gafc6470ad3f5a7a6427404807309f3ab2">cpl_bivector_get_x()</a>, <a class="el" href="group__cpl__bivector.html#ga1f13e7e98cc006f90242e339d7542776">cpl_bivector_get_x_data()</a>, <a class="el" href="group__cpl__bivector.html#gaf8d11b6df2484e6e77923e898de9c9a1">cpl_bivector_get_y()</a>, <a class="el" href="group__cpl__bivector.html#ga0b602bdb76caaae732af9825dd5a533b">cpl_bivector_get_y_data()</a>, <a class="el" href="group__cpl__bivector.html#ga12e8941b1eda64be7e5dafe16ce4dc24">cpl_bivector_new()</a>, <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a5b82c7780a2a8a79dfafcac70717b830">CPL_ERROR_DATA_NOT_FOUND</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__geom__img.html#ga135df3510913add18d5550a8aa356923">cpl_geom_img_offset_fine()</a>, <a class="el" href="group__cpl__geom__img.html#ga8df5c11aeb84394817af6a0680c2859c">cpl_geom_img_offset_saa()</a>, <a class="el" href="group__cpl__imagelist.html#gaeacc812db51ccbb9e9f7716e129a14aa">cpl_imagelist_delete()</a>, <a class="el" href="group__cpl__imagelist.html#ga54748d0bd9b59fed18bf798fd6d6c7dc">cpl_imagelist_get_const()</a>, <a class="el" href="group__cpl__imagelist.html#ga004ae3644840b042152887fb93fdd0ed">cpl_imagelist_get_size()</a>, <a class="el" href="group__cpl__imagelist.html#ga94e27dfea06bc089d018e4c5a3b6a4be">cpl_imagelist_is_uniform()</a>, <a class="el" href="group__cpl__imagelist.html#ga2dbf72b4729a9e1a8bc6d19d0cbc2037">cpl_imagelist_new()</a>, <a class="el" href="group__cpl__imagelist.html#gad6bce4e990300800fa351fe73d0865b6">cpl_imagelist_set()</a>, <a class="el" href="group__cpl__imagelist.html#ga4749fab55a1e26710f7003345f2499f1">cpl_imagelist_unset()</a>, <a class="el" href="group__cpl__type.html#ga4f6c44a14bbc3aea87b1f47acf8dfd02">CPL_SIZE_FORMAT</a>, <a class="el" href="group__cpl__vector.html#gaf563c19d309c5b60d148a84cb156c2cf">cpl_vector_delete()</a>, <a class="el" href="group__cpl__vector.html#ga991ded30622122c78bb34191f7c7a7c6">cpl_vector_get_data_const()</a>, <a class="el" href="group__cpl__vector.html#ga0a0d8b61b19cd1d3668525a3f2d55e72">cpl_vector_new()</a>, and <a class="el" href="group__cpl__vector.html#ga82def4430dfa77393ae974bbc915d360">cpl_vector_set_size()</a>.</p>
</div>
</div>
<a class="anchor" id="ga135df3510913add18d5550a8aa356923"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_bivector* cpl_geom_img_offset_fine </td>
<td>(</td>
<td class="paramtype">const cpl_imagelist * </td>
<td class="paramname"><em>ilist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_bivector * </td>
<td class="paramname"><em>estimates</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_bivector * </td>
<td class="paramname"><em>anchors</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>s_hx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>s_hy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>m_hx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>m_hy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>correl</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the offsets by correlating the images. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ilist</td><td>Input image list </td></tr>
<tr><td class="paramname">estimates</td><td>First-guess estimation of the offsets </td></tr>
<tr><td class="paramname">anchors</td><td>List of anchor points </td></tr>
<tr><td class="paramname">s_hx</td><td>Half-width of search area </td></tr>
<tr><td class="paramname">s_hy</td><td>Half-height of search area </td></tr>
<tr><td class="paramname">m_hx</td><td>Half-width of measurement area </td></tr>
<tr><td class="paramname">m_hy</td><td>Half-height of measurement area </td></tr>
<tr><td class="paramname">correl</td><td>List of cross-correlation quality factors </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>List of offsets or NULL on error</dd></dl>
<p>The matching is performed using a 2d cross-correlation, using a minimal squared differences criterion. One measurement is performed per input anchor point, and the median offset is returned together with a measure of similarity for each plane.</p>
<p>The images in the input list must only differ from a shift. In order from the correlation to work, they must have the same level (check the average values of your input images if the correlation does not work).</p>
<p>The supported types are CPL_TYPE_DOUBLE and CPL_TYPE_FLOAT. The bad pixel maps are ignored by this function.</p>
<p>The ith offset (offsx, offsy) in the returned offsets is the one that have to be used to shift the ith image to align it on the reference image (the first one).</p>
<p>If not NULL, the returned cpl_bivector must be deallocated with <a class="el" href="group__cpl__bivector.html#gab49cf8bcea934646b96a4d4e476d7e54" title="Delete a cpl_bivector. ">cpl_bivector_delete()</a>.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if ilist is not valid </li>
</ul>
<p>References <a class="el" href="group__cpl__bivector.html#ga7b84e7673a8ea5ae32fb8161202e2f48">cpl_bivector_get_size()</a>, <a class="el" href="group__cpl__bivector.html#ga1f13e7e98cc006f90242e339d7542776">cpl_bivector_get_x_data()</a>, <a class="el" href="group__cpl__bivector.html#ga6df6e1f59656d27f36be998b18f53ea4">cpl_bivector_get_x_data_const()</a>, <a class="el" href="group__cpl__bivector.html#ga0b602bdb76caaae732af9825dd5a533b">cpl_bivector_get_y_data()</a>, <a class="el" href="group__cpl__bivector.html#ga4efd181088428c4fe42541cad1c594af">cpl_bivector_get_y_data_const()</a>, <a class="el" href="group__cpl__bivector.html#ga12e8941b1eda64be7e5dafe16ce4dc24">cpl_bivector_new()</a>, <a class="el" href="group__cpl__filter.html#ggaa315d358382b534d5a2ef030f8eda2aca820569d4c7243b26d13764a011b28391">CPL_BORDER_FILTER</a>, <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__errorstate.html#gadbf3f1525429b95837bc79a5e99b12cd">cpl_errorstate_get()</a>, <a class="el" href="group__cpl__errorstate.html#gaa72d44efb065d64d8f1cac3d0e5bf8af">cpl_errorstate_set()</a>, <a class="el" href="group__cpl__filter.html#ggaf183188640e935882ac563db92f8d372aee652025fd8524c6369fcb0a8bf64c2a">CPL_FILTER_MEDIAN</a>, <a class="el" href="group__cpl__image.html#ga272e4e004716651b94d6d36e575b6841">cpl_image_delete()</a>, <a class="el" href="group__cpl__image.html#ga09c5ec8125d5ad2d14824106ac78061c">cpl_image_filter_mask()</a>, <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__image.html#ga17f97e60794f88e7f06b85cccbecc132">cpl_image_get_type()</a>, <a class="el" href="group__cpl__image.html#gab95562a5dbc2372f52ce644c50bfcd26">cpl_image_new()</a>, <a class="el" href="group__cpl__imagelist.html#ga54748d0bd9b59fed18bf798fd6d6c7dc">cpl_imagelist_get_const()</a>, <a class="el" href="group__cpl__imagelist.html#ga004ae3644840b042152887fb93fdd0ed">cpl_imagelist_get_size()</a>, <a class="el" href="group__cpl__imagelist.html#ga94e27dfea06bc089d018e4c5a3b6a4be">cpl_imagelist_is_uniform()</a>, <a class="el" href="group__cpl__mask.html#gaa312160718b8fdc24de0cd755cf35224">cpl_mask_delete()</a>, <a class="el" href="group__cpl__mask.html#gab67918578893ea4a0e005cb4397f8754">cpl_mask_new()</a>, <a class="el" href="group__cpl__mask.html#gaa30bea67c21cd608beb6add0a45a3f2f">cpl_mask_not()</a>, <a class="el" href="group__cpl__msg.html#ga79b9e333679e2b8f2cf8af77b8f58a91">cpl_msg_debug()</a>, <a class="el" href="group__cpl__type.html#ga4f6c44a14bbc3aea87b1f47acf8dfd02">CPL_SIZE_FORMAT</a>, and <a class="el" href="group__cpl__vector.html#gaca37a188555aff6e2379199e7fae49be">cpl_vector_get_data()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__geom__img.html#ga91f5d0da222fcce4d019f2d241cc20f8">cpl_geom_img_offset_combine()</a>.</p>
</div>
</div>
<a class="anchor" id="ga8df5c11aeb84394817af6a0680c2859c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_image** cpl_geom_img_offset_saa </td>
<td>(</td>
<td class="paramtype">const cpl_imagelist * </td>
<td class="paramname"><em>ilist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_bivector * </td>
<td class="paramname"><em>offs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_kernel </td>
<td class="paramname"><em>kernel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>rejmin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> </td>
<td class="paramname"><em>rejmax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_geom_combine </td>
<td class="paramname"><em>union_flag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double * </td>
<td class="paramname"><em>ppos_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double * </td>
<td class="paramname"><em>ppos_y</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shift and add an images list to a single image. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ilist</td><td>Input image list </td></tr>
<tr><td class="paramname">offs</td><td>List of offsets in x and y </td></tr>
<tr><td class="paramname">kernel</td><td>Interpolation kernel to use for resampling </td></tr>
<tr><td class="paramname">rejmin</td><td>Number of minimum value pixels to reject in stacking </td></tr>
<tr><td class="paramname">rejmax</td><td>Number of maximum value pixels to reject in stacking </td></tr>
<tr><td class="paramname">union_flag</td><td>Combination mode, CPL_GEOM_UNION, CPL_GEOM_INTERSECT or CPL_GEOM_FIRST </td></tr>
<tr><td class="paramname">ppos_x</td><td>If non-NULL, *ppos_x is the X-position of the first image in the combined image </td></tr>
<tr><td class="paramname">ppos_y</td><td>If non-NULL, *ppos_y is the Y- position of the first image in the combined image </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly allocated images array, or NULL on error.</dd></dl>
<p>The supported types are CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT.</p>
<p>The number of provided offsets shall be equal to the number of input images. The ith offset (offs_x, offs_y) is the offset that has to be used to shift the ith image to align it on the first one.</p>
<p>Provide the name of the kernel you want to generate. Supported kernel types are:</p><ul>
<li>CPL_KERNEL_DEFAULT: default kernel, currently CPL_KERNEL_TANH</li>
<li>CPL_KERNEL_TANH: Hyperbolic tangent</li>
<li>CPL_KERNEL_SINC: Sinus cardinal</li>
<li>CPL_KERNEL_SINC2: Square sinus cardinal</li>
<li>CPL_KERNEL_LANCZOS: Lanczos2 kernel</li>
<li>CPL_KERNEL_HAMMING: Hamming kernel</li>
<li>CPL_KERNEL_HANN: Hann kernel</li>
<li>CPL_KERNEL_NEAREST: Nearest neighbor kernel (1 when dist < 0.5, else 0)</li>
</ul>
<p>If the number of input images is lower or equal to 3, the rejection parameters are ignored. If the number of input images is lower or equal to 2*(rejmin+rejmax), the rejection parameters are ignored.</p>
<p>On success the returned image array contains 2 images:</p><ul>
<li>the combined image</li>
<li>the contribution map</li>
</ul>
<p>Pixels with a zero in the contribution map are flagged as bad in the combined image.</p>
<p>If not NULL, the returned cpl_image array arr must be deallocated like: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> if (arr[0] != NULL) cpl_image_delete(arr[0]);</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> if (arr[1] != NULL) cpl_image_delete(arr[1]);</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> cpl_free(arr);</div>
</div><!-- fragment --><p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if ilist is invalid or if rejmin or rejmax is negative</li>
<li>CPL_ERROR_INCOMPATIBLE_INPUT if ilist and offs have different sizes</li>
<li>CPL_ERROR_ILLEGAL_OUTPUT if the CPL_GEOM_INTERSECT method is used with non-overlapping images.</li>
<li>CPL_ERROR_INVALID_TYPE if the passed image list type is not supported</li>
<li>CPL_ERROR_UNSUPPORTED_MODE if the union_flag is not one of the supported combination modes, which are <em>CPL_GEOM_INTERSECT</em>, <em>CPL_GEOM_UNION</em>, <em>CPL_GEOM_FIRST</em>. </li>
</ul>
<p>References <a class="el" href="group__cpl__bivector.html#ga7b84e7673a8ea5ae32fb8161202e2f48">cpl_bivector_get_size()</a>, <a class="el" href="group__cpl__bivector.html#gaa7b11c49923e2538d454306ed39a34a9">cpl_bivector_get_x_const()</a>, <a class="el" href="group__cpl__bivector.html#ga314efce3125658f6e39b02a21d78a374">cpl_bivector_get_y_const()</a>, <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a30328e7fa5dfffbf12af9ed630a115fb">CPL_ERROR_ILLEGAL_OUTPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7907a24014a3a45aebe5ee1842f0c6f3">CPL_ERROR_INVALID_TYPE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a74ef8e37f3412e85cfc22840d13bdd0c">CPL_ERROR_UNSUPPORTED_MODE</a>, <a class="el" href="group__cpl__image.html#ga035ba167b6776b782e9920335dba5587">cpl_image_accept_all()</a>, <a class="el" href="group__cpl__image.html#ga272e4e004716651b94d6d36e575b6841">cpl_image_delete()</a>, <a class="el" href="group__cpl__image.html#gadebfe1dae2cbd7a59fc09b323c55c10e">cpl_image_duplicate()</a>, <a class="el" href="group__cpl__image.html#gabdd5469f56fb6e7fa791b23fe459a75c">cpl_image_fill_rejected()</a>, <a class="el" href="group__cpl__image.html#gae9bede9669991943541a96e6921b4637">cpl_image_get_bpm()</a>, <a class="el" href="group__cpl__image.html#gaa199c6fc00ac1d83ed37fb9717e2c4bd">cpl_image_get_bpm_const()</a>, <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__image.html#ga17f97e60794f88e7f06b85cccbecc132">cpl_image_get_type()</a>, <a class="el" href="group__cpl__image.html#gab95562a5dbc2372f52ce644c50bfcd26">cpl_image_new()</a>, <a class="el" href="group__cpl__image.html#ga258483437ae0eb156025b379ef8fe810">cpl_image_new_from_mask()</a>, <a class="el" href="group__cpl__image.html#ga9ccaf8ab0d6e20c7aba7b3da1bade322">cpl_image_wrap_int()</a>, <a class="el" href="group__cpl__imagelist.html#ga54748d0bd9b59fed18bf798fd6d6c7dc">cpl_imagelist_get_const()</a>, <a class="el" href="group__cpl__imagelist.html#ga004ae3644840b042152887fb93fdd0ed">cpl_imagelist_get_size()</a>, <a class="el" href="group__cpl__imagelist.html#ga94e27dfea06bc089d018e4c5a3b6a4be">cpl_imagelist_is_uniform()</a>, <a class="el" href="group__cpl__imagelist.html#gaab41a8298db503e150fa1f17bec27396">cpl_imagelist_unwrap()</a>, <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>, <a class="el" href="group__cpl__mask.html#ga0009ad4c6aed58343b09e47ef38ef9e4">cpl_mask_is_empty()</a>, <a class="el" href="group__cpl__mask.html#gaa30bea67c21cd608beb6add0a45a3f2f">cpl_mask_not()</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086a4923f03f3a673edd344b0d81835ca69e">CPL_TYPE_DOUBLE</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086aa44c37e26b9040a96e3a49b405946942">CPL_TYPE_FLOAT</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ae333db5ccea0813ccd892525b4ba1345">CPL_TYPE_INT</a>, <a class="el" href="group__cpl__vector.html#gaf563c19d309c5b60d148a84cb156c2cf">cpl_vector_delete()</a>, <a class="el" href="group__cpl__vector.html#ga1bd48a276b770a01a7b079042f9e20d2">cpl_vector_duplicate()</a>, <a class="el" href="group__cpl__vector.html#ga55809b8b88d4e32f95752434e26ced57">cpl_vector_fill_kernel_profile()</a>, <a class="el" href="group__cpl__vector.html#ga991ded30622122c78bb34191f7c7a7c6">cpl_vector_get_data_const()</a>, <a class="el" href="group__cpl__vector.html#gafef8c7bc7b9686d0d34e0cf1d77bfb4b">cpl_vector_get_max()</a>, <a class="el" href="group__cpl__vector.html#gadf1b46bc41268ebc31fbf3e9a961d94b">cpl_vector_get_min()</a>, <a class="el" href="group__cpl__vector.html#ga0a0d8b61b19cd1d3668525a3f2d55e72">cpl_vector_new()</a>, and <a class="el" href="group__cpl__vector.html#ga3e666a2bfa29449a181b000c62df58ef">cpl_vector_sort()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__geom__img.html#ga91f5d0da222fcce4d019f2d241cc20f8">cpl_geom_img_offset_combine()</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
|