This file is indexed.

/usr/share/gtk-doc/html/libvips/libvips-freq-filt.html is in libvips-doc 7.26.3-1build1.

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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>freq_filt</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch02.html" title="VIPS operation API by section">
<link rel="prev" href="VipsFormat.html" title="VipsFormat">
<link rel="next" href="libvips-histograms-lut.html" title="histograms_lut">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="VipsFormat.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">VIPS Reference Manual</th>
<td><a accesskey="n" href="libvips-histograms-lut.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libvips-freq-filt.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libvips-freq-filt.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libvips-freq-filt"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-freq-filt.top_of_page"></a>freq_filt</span></h2>
<p>freq_filt — fourier transforms and frequency-domin filters</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-freq-filt.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="libvips-freq-filt.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;vips/vips.h&gt;

enum                <a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType">VipsMaskType</a>;
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-fwfft" title="im_fwfft ()">im_fwfft</a>                            (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-invfft" title="im_invfft ()">im_invfft</a>                           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-invfftr" title="im_invfftr ()">im_invfftr</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-freqflt" title="im_freqflt ()">im_freqflt</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-disp-ps" title="im_disp_ps ()">im_disp_ps</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()">im_rotquad</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-phasecor-fft" title="im_phasecor_fft ()">im_phasecor_fft</a>                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-flt-image-freq" title="im_flt_image_freq ()">im_flt_image_freq</a>                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType"><span class="type">VipsMaskType</span></a> flag</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-create-fmask" title="im_create_fmask ()">im_create_fmask</a>                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> xsize</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> ysize</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType"><span class="type">VipsMaskType</span></a> flag</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libvips-freq-filt.html#im-fractsurf" title="im_fractsurf ()">im_fractsurf</a>                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> frd</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libvips-freq-filt.description"></a><h2>Description</h2>
<p>
To and from Fourier space, filter in Fourier space, convert Fourier-space
images to a displayable form.
</p>
</div>
<div class="refsect1">
<a name="libvips-freq-filt.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="VipsMaskType"></a><h3>enum VipsMaskType</h3>
<pre class="programlisting">typedef enum {
        VIPS_MASK_IDEAL_HIGHPASS = 0,
        VIPS_MASK_IDEAL_LOWPASS = 1,
        VIPS_MASK_BUTTERWORTH_HIGHPASS = 2,
        VIPS_MASK_BUTTERWORTH_LOWPASS = 3,
        VIPS_MASK_GAUSS_HIGHPASS = 4,
        VIPS_MASK_GAUSS_LOWPASS = 5,

        VIPS_MASK_IDEAL_RINGPASS = 6,
        VIPS_MASK_IDEAL_RINGREJECT = 7,
        VIPS_MASK_BUTTERWORTH_RINGPASS = 8,
        VIPS_MASK_BUTTERWORTH_RINGREJECT = 9,
        VIPS_MASK_GAUSS_RINGPASS = 10,
        VIPS_MASK_GAUSS_RINGREJECT = 11,

        VIPS_MASK_IDEAL_BANDPASS = 12,
        VIPS_MASK_IDEAL_BANDREJECT = 13,
        VIPS_MASK_BUTTERWORTH_BANDPASS = 14,
        VIPS_MASK_BUTTERWORTH_BANDREJECT = 15,
        VIPS_MASK_GAUSS_BANDPASS = 16,
        VIPS_MASK_GAUSS_BANDREJECT = 17,

        VIPS_MASK_FRACTAL_FLT = 18
} VipsMaskType;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="im-fwfft"></a><h3>im_fwfft ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_fwfft                            (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Transform an image to Fourier space.
</p>
<p>
VIPS uses the fftw3 or fftw2 Fourier transform libraries if possible. If 
they were not available when VIPS was built, it falls back to it's own 
FFT functions which are slow and only work for square images whose sides
are a power of two.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-invfft" title="im_invfft ()"><code class="function">im_invfft()</code></a>, <a class="link" href="libvips-freq-filt.html#im-disp-ps" title="im_disp_ps ()"><code class="function">im_disp_ps()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-invfft"></a><h3>im_invfft ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_invfft                           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Transform an image from Fourier space to real space. The result is complex.
If you are OK with a real result, use <a class="link" href="libvips-freq-filt.html#im-invfftr" title="im_invfftr ()"><code class="function">im_invfftr()</code></a> instead, it's quicker.
</p>
<p>
VIPS uses the fftw3 or fftw2 Fourier transform libraries if possible. If 
they were not available when VIPS was built, it falls back to it's own 
FFT functions which are slow and only work for square images whose sides
are a power of two.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-invfftr" title="im_invfftr ()"><code class="function">im_invfftr()</code></a>, <a class="link" href="libvips-freq-filt.html#im-fwfft" title="im_fwfft ()"><code class="function">im_fwfft()</code></a>, <a class="link" href="libvips-freq-filt.html#im-disp-ps" title="im_disp_ps ()"><code class="function">im_disp_ps()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-invfftr"></a><h3>im_invfftr ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_invfftr                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Transform an image from Fourier space to real space, giving a real result.
This is faster than <a class="link" href="libvips-freq-filt.html#im-invfft" title="im_invfft ()"><code class="function">im_invfft()</code></a>, which gives a complex result. 
</p>
<p>
VIPS uses the fftw3 or fftw2 Fourier transform libraries if possible. If 
they were not available when VIPS was built, it falls back to it's own 
FFT functions which are slow and only work for square images whose sides
are a power of two.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-invfft" title="im_invfft ()"><code class="function">im_invfft()</code></a>, <a class="link" href="libvips-freq-filt.html#im-fwfft" title="im_fwfft ()"><code class="function">im_fwfft()</code></a>, <a class="link" href="libvips-freq-filt.html#im-disp-ps" title="im_disp_ps ()"><code class="function">im_disp_ps()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-freqflt"></a><h3>im_freqflt ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_freqflt                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Filter an image in Fourier space.
</p>
<p>
<em class="parameter"><code>in</code></em> is transformed to Fourier space, multipled with the mask image, then
transformed back to real space. If <em class="parameter"><code>in</code></em> is already a complex image, just
multiply then inverse transform.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-invfftr" title="im_invfftr ()"><code class="function">im_invfftr()</code></a>, <a class="link" href="libvips-freq-filt.html#im-create-fmask" title="im_create_fmask ()"><code class="function">im_create_fmask()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>mask image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-disp-ps"></a><h3>im_disp_ps ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_disp_ps                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Make a displayable (ie. 8-bit unsigned int) power spectrum. 
</p>
<p>
If <em class="parameter"><code>in</code></em> is non-complex, it is transformed to Fourier space. Then the
absolute value is passed through <a class="link" href="libvips-conversion.html#im-scaleps" title="im_scaleps ()"><code class="function">im_scaleps()</code></a>, and <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()"><code class="function">im_rotquad()</code></a>.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-scaleps" title="im_scaleps ()"><code class="function">im_scaleps()</code></a>, <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()"><code class="function">im_rotquad()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-rotquad"></a><h3>im_rotquad ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_rotquad                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Rotate the quadrants of the image so that the point that was at the
top-left is now in the centre. Handy for moving Fourier images to optical
space.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-wrap" title="im_wrap ()"><code class="function">im_wrap()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-phasecor-fft"></a><h3>im_phasecor_fft ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_phasecor_fft                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Convert the two input images to Fourier space, calculate phase-correlation,
back to real space.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-fwfft" title="im_fwfft ()"><code class="function">im_fwfft()</code></a>, <a class="link" href="libvips-arithmetic.html#im-cross-phase" title="im_cross_phase ()"><code class="function">im_cross_phase()</code></a>,
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in1</code></em> :</span></p></td>
<td>first input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>in2</code></em> :</span></p></td>
<td>second input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-flt-image-freq"></a><h3>im_flt_image_freq ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_flt_image_freq                   (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType"><span class="type">VipsMaskType</span></a> flag</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a mask (see <a class="link" href="libvips-freq-filt.html#im-create-fmask" title="im_create_fmask ()"><code class="function">im_create_fmask()</code></a>) and filters an image with it (see
<a class="link" href="libvips-freq-filt.html#im-freqflt" title="im_freqflt ()"><code class="function">im_freqflt()</code></a>).
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-create-fmask" title="im_create_fmask ()"><code class="function">im_create_fmask()</code></a>, <a class="link" href="libvips-freq-filt.html#im-freqflt" title="im_freqflt ()"><code class="function">im_freqflt()</code></a>,
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
<td>mask type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>mask parameters</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-create-fmask"></a><h3>im_create_fmask ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_create_fmask                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> xsize</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> ysize</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType"><span class="type">VipsMaskType</span></a> flag</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
This operation creates a one-band float image of the specified size. The
image must be square, and the sides must be a power of two. The image has
values in the range [0, 1] and is typically used for multiplying against 
frequency domain images to filter them.
</p>
<p>
All masks are created with the DC component at (0, 0), so you might want to
rotate the quadrants with <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()"><code class="function">im_rotquad()</code></a> before viewing. The DC pixel always
has the value 1.0.
</p>
<p>
The value of <em class="parameter"><code>flag</code></em> sets the type pf mask created, and extra parameters set
the exact mask shape. All extra parameters are doubles. This table 
summarises the possible values:
</p>
<p>
</p>
<div class="table">
<a name="id479634"></a><p class="title"><b>Table 5. Parameters for <a class="link" href="libvips-freq-filt.html#im-create-fmask" title="im_create_fmask ()"><code class="function">im_create_fmask()</code></a></b></p>
<div class="table-contents"><table summary="Parameters for im_create_fmask()" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th align="left"><a class="link" href="libvips-freq-filt.html#VipsMaskType" title="enum VipsMaskType"><span class="type">VipsMaskType</span></a></th>
<th align="left">nargs</th>
<th align="left">Parameters (all double)</th>
</tr></thead>
<tbody>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_HIGHPASS</span></td>
<td align="left">1</td>
<td align="left">frequency_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_LOWPASS</span></td>
<td align="left">1</td>
<td align="left">frequency_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_HIGHPASS</span></td>
<td align="left">3</td>
<td align="left">order, frequency_cutoff, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_LOWPASS</span></td>
<td align="left">3</td>
<td align="left">order, frequency_cutoff, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_HIGHPASS</span></td>
<td align="left">2</td>
<td align="left">frequency_cutoff, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_LOWPASS</span></td>
<td align="left">2</td>
<td align="left">frequency_cutoff, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_RINGPASS</span></td>
<td align="left">2</td>
<td align="left">frequency_cutoff, width</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_RINGREJECT</span></td>
<td align="left">2</td>
<td align="left">frequency_cutoff, width</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_RINGPASS</span></td>
<td align="left">4</td>
<td align="left">order, frequency_cutoff, width, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_RINGREJECT</span></td>
<td align="left">4</td>
<td align="left">order, frequency_cutoff, width, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_RINGPASS</span></td>
<td align="left">3</td>
<td align="left">frequency_cutoff, width, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_RINGREJECT</span></td>
<td align="left">3</td>
<td align="left">frequency_cutoff, width, amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_BANDPASS</span></td>
<td align="left">3</td>
<td align="left">frequency_cutoffx, frequency_cutoffy, radius</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_IDEAL_BANDREJECT</span></td>
<td align="left">3</td>
<td align="left">frequency_cutoffx, frequency_cutoffy, radius</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_BANDPASS</span></td>
<td align="left">5</td>
<td align="left">order, frequency_cutoffx, frequency_cutoffy, radius,
        amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_BUTTERWORTH_BANDREJECT</span></td>
<td align="left">5</td>
<td align="left">order, frequency_cutoffx, frequency_cutoffy, radius,
        amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_BANDPASS</span></td>
<td align="left">4</td>
<td align="left">frequency_cutoffx, frequency_cutoffy, radius, 
        amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_GAUSS_BANDREJECT</span></td>
<td align="left">4</td>
<td align="left">frequency_cutoffx, frequency_cutoffy, radius, 
        amplitude_cutoff</td>
</tr>
<tr>
<td align="left"><span class="type">VIPS_MASK_FRACTAL_FLT</span></td>
<td align="left">1</td>
<td align="left">fractal_dimension</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<p>
Unless noted below, all parameters are expressed as percentages, scaled to
[0, 1].
</p>
<p>
<span class="emphasis"><em>High-pass, low-pass masks:</em></span> A high pass filter 
mask filters the low frequencies while allowing the high frequencies to 
get through.  The reverse happens with a low pass filter mask.  
</p>
<p>
<span class="emphasis"><em>Ring-pass, ring-reject masks:</em></span> A ring filter passes or
rejects a range of frequencies. The range is specified by the
<em class="parameter"><code>frequency_cutoff</code></em> and the <em class="parameter"><code>width</code></em>.
</p>
<p>
<span class="emphasis"><em>Band-pass, band-reject masks:</em></span> These masks are used to
pass or remove spatial frequencies around a given frequency. The position
of the frequency to pass or remove is given by <em class="parameter"><code>frequency_cutoffx</code></em> and
<em class="parameter"><code>frequency_cutoffy</code></em>. The size of the region around the point is given by
<em class="parameter"><code>radius</code></em>.
</p>
<p>
<span class="emphasis"><em>Ideal filters:</em></span> These filters pass or reject
frequencies with a sharp cutoff at the transition.
</p>
<p>
<span class="emphasis"><em>Butterworth filters:</em></span> These filters use a Butterworth
function to separate the frequencies (see Gonzalez and Wintz, Digital
Image Processing, 1987). The shape of the curve is controlled by <em class="parameter"><code>order</code></em>:
higher values give a sharper transition.
</p>
<p>
<span class="emphasis"><em>Gaussian filters:</em></span> These filters have a smooth Gaussian
shape, controlled by <em class="parameter"><code>amplitude_cutoff</code></em>.
</p>
<p>
<span class="emphasis"><em>VIPS_MASK_FRACTAL_FLT:</em></span> This mask is handy for
filtering images of gaussian noise in order to create surfaces of a given
fractal dimension. <em class="parameter"><code>fractal_dimension</code></em> should be between 2 and 3.
</p>
<p>
See also: <a class="link" href="libvips-freq-filt.html#im-flt-image-freq" title="im_flt_image_freq ()"><code class="function">im_flt_image_freq()</code></a>, <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()"><code class="function">im_rotquad()</code></a>,
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>image to write to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xsize</code></em> :</span></p></td>
<td>image size</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ysize</code></em> :</span></p></td>
<td>image size</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
<td>mask type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>mask parameters</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-fractsurf"></a><h3>im_fractsurf ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 im_fractsurf                        (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
                                                         <em class="parameter"><code><span class="type">double</span> frd</code></em>);</pre>
<p>
Generate an image of size <em class="parameter"><code>size</code></em> and fractal dimension <em class="parameter"><code>frd</code></em>. The dimension
should be between 2 and 3.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-gaussnoise" title="im_gaussnoise ()"><code class="function">im_gaussnoise()</code></a>, <a class="link" href="libvips-freq-filt.html#im-flt-image-freq" title="im_flt_image_freq ()"><code class="function">im_flt_image_freq()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>size of image to generate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>frd</code></em> :</span></p></td>
<td>fractal dimension</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="libvips-freq-filt.see-also"></a><h2>See Also</h2>
image
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>