]> Creatis software - CreaPhase.git/blob - octave_packages/image-1.0.15/doc-cache
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / image-1.0.15 / doc-cache
1 # Created by Octave 3.6.1, Mon Mar 12 21:54:04 2012 UTC <root@t61>
2 # name: cache
3 # type: cell
4 # rows: 3
5 # columns: 95
6 # name: <cell-element>
7 # type: sq_string
8 # elements: 1
9 # length: 8
10 applylut
11
12
13 # name: <cell-element>
14 # type: sq_string
15 # elements: 1
16 # length: 554
17  -- Function File: A =  applylut (BW,LUT)
18      Uses lookup tables to perform a neighbour operation on binary
19      images.
20
21      A = applylut(BW,LUT) returns the result of a neighbour operation
22      using the lookup table LUT which can be created by makelut.
23
24      It first computes a matrix with the index of each element in the
25      lookup table. To do this, it convolves the original matrix with a
26      matrix which assigns each of the neighbours a bit in the resulting
27      index. Then LUT is accessed to compute the result.
28
29      See also: makelut
30
31
32
33
34
35 # name: <cell-element>
36 # type: sq_string
37 # elements: 1
38 # length: 69
39 Uses lookup tables to perform a neighbour operation on binary images.
40
41
42
43 # name: <cell-element>
44 # type: sq_string
45 # elements: 1
46 # length: 7
47 bestblk
48
49
50 # name: <cell-element>
51 # type: sq_string
52 # elements: 1
53 # length: 832
54  -- Function File: SIZ =  bestblk ([M N], K)
55  -- Function File: [MB NB] =  bestblk ([M N], K)
56      Calculates the best size of block for block processing.
57
58      `siz=bestblk([m,n],k)' calculates the optimal block size for block
59      processing for a M-by-N image. K is the maximum side dimension of
60      the block. Its default value is 100. SIZ is a row vector which
61      contains row and column dimensions for the block.
62
63      `[mb,nb]=bestblk([m,n],k)' behaves as described above but returns
64      block dimensions to MB and NB.
65
66      *Algorithm:*
67
68      For each dimension (M and N), it follows this algorithm:
69
70      1.- If dimension is less or equal than K, it returns the dimension
71      value.
72
73      2.- If not then returns the value between
74      `round(min(dimension/10,k/2))' which minimizes padding.
75
76      See also: blkproc
77
78
79
80
81
82 # name: <cell-element>
83 # type: sq_string
84 # elements: 1
85 # length: 55
86 Calculates the best size of block for block processing.
87
88
89
90 # name: <cell-element>
91 # type: sq_string
92 # elements: 1
93 # length: 7
94 blkproc
95
96
97 # name: <cell-element>
98 # type: sq_string
99 # elements: 1
100 # length: 1441
101  -- Function File: B =  blkproc (A, [M,N], FUN)
102  -- Function File: B =  blkproc (A, [M,N], FUN, ...)
103  -- Function File: B =  blkproc (A, [M,N], [MBORDER,NBORDER], FUN, ...)
104  -- Function File: B =  blkproc (A, 'indexed', ...)
105      Processes image in blocks using user-supplied function.
106
107      `B=blkproc(A,[m,n],fun)' divides image A in M-by-N blocks, and
108      passes them to user-supplied function FUN, which result is
109      concatenated to build returning matrix B. If padding is needed to
110      build M-by-N, it is added at the bottom and right borders of the
111      image.  0 is used as a padding value.
112
113      `B=blkproc(A,[m,n],fun,...)' behaves as described above but passes
114      extra parameters to function FUN.
115
116      `B=blkproc(A,[m,n],[mborder,nborder],fun,...)' behaves as
117      described but uses blocks which overlap with neighbour blocks.
118      Overlapping dimensions are MBORDER vertically and NBORDER
119      horizontally. This doesn't change the number of blocks in an image
120      (which depends only on size(A) and [M,N]). Adding a border
121      requires extra padding on all edges of the image. 0 is used as a
122      padding value.
123
124      `B=blkproc(A,'indexed',...)' assumes that A is an indexed image,
125      so it pads the image using proper value: 0 for uint8 and uint16
126      images and 1 for double images. Keep in mind that if 'indexed' is
127      not specified padding is always done using 0.
128
129      See also: colfilt, inline, bestblk
130
131
132
133
134
135 # name: <cell-element>
136 # type: sq_string
137 # elements: 1
138 # length: 55
139 Processes image in blocks using user-supplied function.
140
141
142
143 # name: <cell-element>
144 # type: sq_string
145 # elements: 1
146 # length: 8
147 bmpwrite
148
149
150 # name: <cell-element>
151 # type: sq_string
152 # elements: 1
153 # length: 361
154  -- Function File: bmpwrite (X, MAP, FILE)
155      Write the bitmap X into FILE (8-bit indexed uncompressed).  The
156      values in X are indices into the given RGB colour MAP.
157
158  -- Function File: bmpwrite (X, FILE)
159      Write the bitmap X into FILE (24-bit truecolor uncompressed).  X
160      is an m x n x 3 array of R,G,B integer values in the range 0 to
161      255.
162
163
164
165
166 # name: <cell-element>
167 # type: sq_string
168 # elements: 1
169 # length: 58
170 Write the bitmap X into FILE (8-bit indexed uncompressed).
171
172
173
174 # name: <cell-element>
175 # type: sq_string
176 # elements: 1
177 # length: 6
178 bwarea
179
180
181 # name: <cell-element>
182 # type: sq_string
183 # elements: 1
184 # length: 425
185  -- Function File: TOTAL = bwarea(BW)
186      Estimates the area of the "on" pixels of BW.  If BW is a binary
187      image "on" pixels are defined as pixels valued 1. If BW is a
188      grayscale image "on" pixels is defined as pixels with values
189      larger than zero.  This algorithm is not the same as counting the
190      number of "on" pixels as it tries to estimate the area of the
191      original object and not the image object.
192
193
194
195
196 # name: <cell-element>
197 # type: sq_string
198 # elements: 1
199 # length: 44
200 Estimates the area of the "on" pixels of BW.
201
202
203
204 # name: <cell-element>
205 # type: sq_string
206 # elements: 1
207 # length: 8
208 bwborder
209
210
211 # name: <cell-element>
212 # type: sq_string
213 # elements: 1
214 # length: 289
215  -- Function File: B =  bwborder (IM)
216      Finds the borders of foreground objects in a binary image.
217
218      B is the borders in the 0-1 matrix IM. 4-neighborhood is
219      considered.
220
221      A pixel is on the border if it is set in IM, and it has at least
222      one neighbor that is not set.
223
224
225
226
227 # name: <cell-element>
228 # type: sq_string
229 # elements: 1
230 # length: 58
231 Finds the borders of foreground objects in a binary image.
232
233
234
235 # name: <cell-element>
236 # type: sq_string
237 # elements: 1
238 # length: 12
239 bwboundaries
240
241
242 # name: <cell-element>
243 # type: sq_string
244 # elements: 1
245 # length: 1278
246  -- Function File: BOUNDARIES =  bwboundaries(BW)
247  -- Function File: BOUNDARIES =  bwboundaries(BW, CONN)
248  -- Function File: BOUNDARIES =  bwboundaries(BW, CONN, HOLES)
249  -- Function File: [BOUNDARIES, LABELS] =  bwboundaries(...)
250  -- Function File: [BOUNDARIES, LABELS, NUM_LABELS] =  bwboundaries(...)
251      Trace the boundaries of the objects in a binary image.
252
253      BOUNDARIES is a cell array in which each element is the boundary
254      of an object in the binary image BW. The clockwise boundary of
255      each object is computed by the `boundary' function.
256
257      By default the boundaries are computed using 8-connectivity. This
258      can be changed to 4-connectivity by setting CONN to 4.
259
260      By default `bwboundaries' computes all boundaries in the image,
261      i.e.  both interior and exterior object boundaries. This behaviour
262      can be changed through the HOLES input argument. If this is
263      'holes', both boundary types are considered. If it is instead
264      'noholes', only exterior boundaries will be traced.
265
266      If two or more output arguments are requested, the algorithm also
267      returns the labelled image computed by `bwlabel' in LABELS. The
268      number of labels in this image is optionally returned in
269      NUM_LABELS.
270
271      See also: boundary, bwlabel
272
273
274
275
276
277 # name: <cell-element>
278 # type: sq_string
279 # elements: 1
280 # length: 54
281 Trace the boundaries of the objects in a binary image.
282
283
284
285 # name: <cell-element>
286 # type: sq_string
287 # elements: 1
288 # length: 10
289 bwconncomp
290
291
292 # name: <cell-element>
293 # type: sq_string
294 # elements: 1
295 # length: 946
296  -- Function File: CC =  bwconncomp (BW)
297  -- Function File: CC =  bwconncomp (BW, CONNECTIVITY)
298      Trace the boundaries of objects in a binary image.
299
300      `bwconncomp' traces the boundaries of objects in a binary image BW
301      and returns information about them in a structure with the
302      following fields.
303
304     Connectivity
305           The connectivity used in the boundary tracing.
306
307     ImageSize
308           The size of the image BW.
309
310     NumObjects
311           The number of objects in the image BW.
312
313     PixelIdxList
314           A cell array containing where each element corresponds to an
315           object in BW.  Each element is represented as a vector of
316           linear indices of the boundary of the given object.
317
318      The connectivity used in the tracing is by default 4, but can be
319      changed by setting the CONNECTIVITY input parameter to 8. Sadly,
320      this is not yet implemented.
321
322      See also: bwlabel, bwboundaries, ind2sub
323
324
325
326
327
328 # name: <cell-element>
329 # type: sq_string
330 # elements: 1
331 # length: 50
332 Trace the boundaries of objects in a binary image.
333
334
335
336 # name: <cell-element>
337 # type: sq_string
338 # elements: 1
339 # length: 6
340 bwdist
341
342
343 # name: <cell-element>
344 # type: sq_string
345 # elements: 1
346 # length: 1229
347  -- Function File: D = bwdist(BW)
348      Computes the distance transform of the image BW.  BW should be a
349      binary 2D array, either a Boolean array or a numeric array
350      containing only the values 0 and 1.  The return value D is a
351      double matrix of the same size as BW.  Elements with value 0 are
352      considered background pixels, elements with value 1 are considered
353      object pixels. The return value for each background pixel is the
354      distance (according to the chosen metric) to the closest object
355      pixel. For each object pixel the return value is 0.
356
357  -- Function File: D = bwdist(BW, METHOD)
358      METHOD is a string to choose the distance metric. Currently
359      available metrics are 'euclidean', 'chessboard', 'cityblock' and
360      'quasi-euclidean', which may each be abbreviated to any string
361      starting with 'e', 'ch', 'ci' and 'q', respectively.  If METHOD is
362      not specified, 'euclidean' is the default.
363
364  -- Function File: [D,C] = bwdist(BW, METHOD)
365      If a second output argument is given, the linear index for the
366      closest object pixel is returned for each pixel. (For object
367      pixels, the index points to the pixel itself.) The return value C
368      is a matrix the same size as BW.
369
370
371
372
373 # name: <cell-element>
374 # type: sq_string
375 # elements: 1
376 # length: 48
377 Computes the distance transform of the image BW.
378
379
380
381 # name: <cell-element>
382 # type: sq_string
383 # elements: 1
384 # length: 7
385 bweuler
386
387
388 # name: <cell-element>
389 # type: sq_string
390 # elements: 1
391 # length: 720
392  -- Function File: EUL =  bweuler (BW,N)
393      Calculates the Euler number of a binary image.
394
395      EUL=bweuler(BW, N) calculates the Euler number EUL of a binary
396      image BW, which is a scalar whose value is the total number of
397      objects in an image minus the number of holes.
398
399      N can have the values:
400     `4'
401           bweuler will use 4-connected neighbourhood definition.
402
403     `8'
404           bweuler will use 8-connected neighbourhood definition. This
405           is the default value.
406
407      This function uses Bit Quads as described in "Digital Image
408      Processing" to calculate euler number.
409
410      References: W. K. Pratt, "Digital Image Processing", 3rd Edition,
411      pp 593-595
412
413      See also: qtgetblk
414
415
416
417
418
419 # name: <cell-element>
420 # type: sq_string
421 # elements: 1
422 # length: 46
423 Calculates the Euler number of a binary image.
424
425
426
427 # name: <cell-element>
428 # type: sq_string
429 # elements: 1
430 # length: 9
431 bwhitmiss
432
433
434 # name: <cell-element>
435 # type: sq_string
436 # elements: 1
437 # length: 535
438  -- Function File: BW2 = bwhitmiss (BW1, SE1, SE1)
439  -- Function File: BW2 = bwhitmiss (BW1, INTERVAL)
440      Perform the binary hit-miss operation.
441
442      If two structuring elements SE1 and SE1 are given, the hit-miss
443      operation is defined as
444           bw2 = erode(bw1, se1) & erode(!bw1, se2);
445      If instead an 'interval' array is given, two structuring elements
446      are computed as
447           se1 = (interval ==  1)
448           se2 = (interval == -1)
449      and then the operation is defined as previously.
450
451      See also: bwmorph
452
453
454
455
456
457 # name: <cell-element>
458 # type: sq_string
459 # elements: 1
460 # length: 38
461 Perform the binary hit-miss operation.
462
463
464
465 # name: <cell-element>
466 # type: sq_string
467 # elements: 1
468 # length: 7
469 bwmorph
470
471
472 # name: <cell-element>
473 # type: sq_string
474 # elements: 1
475 # length: 6990
476  -- Function File: BW2 =  bwmorph (BW,OPERATION)
477  -- Function File: BW2 =  bwmorph (BW,OPERATION,N)
478      Perform a morphological operation on a binary image.
479
480      BW2=bwmorph(BW,operation) performs a morphological operation
481      specified by OPERATION on binary image BW. All possible operations
482      and their meaning are specified in a table below.
483
484      BW2=bwmorph(BW,operation,n) performs a morphological operation N
485      times. Keep in mind that it has no sense to apply some operations
486      more than once, since some of them return the same result
487      regardless how many iterations we request. Those return a warning
488      if are called with n>1 and they compute the result for n=1.
489
490      N>1 is actually used for the following operations: diag, dilate,
491      erode, majority, shrink, skel, spur, thicken and thin.
492
493     `'bothat''
494           Performs a bottom hat operation, a closing operation (which
495           is a dilation followed by an erosion) and finally substracts
496           the original image.
497
498     `'bridge''
499           Performs a bridge operation. Sets a pixel to 1 if it has two
500           nonzero neighbours which are not connected, so it "bridges"
501           them. There are 119 3-by-3 patterns which trigger setting a
502           pixel to 1.
503
504     `'clean''
505           Performs an isolated pixel remove operation. Sets a pixel to
506           0 if all of its eight-connected neighbours are 0.
507
508     `'close''
509           Performs closing operation, which is a dilation followed by
510           erosion.  It uses a ones(3) matrix as structuring element for
511           both operations.
512
513     `'diag''
514           Performs a diagonal fill operation. Sets a pixel to 1 if that
515           eliminates eight-connectivity of the background.
516
517     `'dilate''
518           Performs a dilation operation. It uses ones(3) as structuring
519           element.
520
521     `'erode''
522           Performs an erosion operation. It uses ones(3) as structuring
523           element.
524
525     `'fill''
526           Performs a interior fill operation. Sets a pixel to 1 if all
527           four-connected pixels are 1.
528
529     `'hbreak''
530           Performs a H-break operation. Breaks (sets to 0) pixels that
531           are H-connected.
532
533     `'majority''
534           Performs a majority black operation. Sets a pixel to 1 if five
535           or more pixels in a 3-by-3 window are 1. If not it is set to
536           0.
537
538     `'open''
539           Performs an opening operation, which is an erosion followed
540           by a dilation. It uses ones(3) as structuring element.
541
542     `'remove''
543           Performs a iterior pixel remove operation. Sets a pixel to 0
544           if all of its four-connected neighbours are 1.
545
546     `'shrink''
547           Performs a shrink operation. Sets pixels to 0 such that an
548           object without holes erodes to a single pixel (set to 1) at
549           or near its center of mass. An object with holes erodes to a
550           connected ring lying midway between each hole and its nearest
551           outer boundary. It preserves Euler number.
552
553     `'skel''
554           Performs a skeletonization operation. It calculates a "median
555           axis skeleton" so that points of this skeleton are at the
556           same distance of its nearby borders. It preserver Euler
557           number. Please read compatibility notes for more info.
558
559           It uses the same algorithm as skel-pratt but this could
560           change for compatibility in the future.
561
562     `'skel-lantuejol''
563           Performs a skeletonization operation as described in Gonzalez
564           & Woods "Digital Image Processing" pp 538-540. The text
565           references Lantuejoul as authour of this algorithm.
566
567           It has the beauty of being a clean and simple approach, but
568           skeletons are thicker than they need to and, in addition, not
569           guaranteed to be connected.
570
571           This algorithm is iterative. It will be applied the minimum
572           value of N times or number of iterations specified in
573           algorithm description. It's most useful to run this algorithm
574           with `n=Inf'.
575
576     `'skel-pratt''
577           Performs a skeletonization operation as described by William
578           K. Pratt in "Digital Image Processing".
579
580     `'spur''
581           Performs a remove spur operation. It sets pixel to 0 if it
582           has only one eight-connected pixel in its neighbourhood.
583
584     `'thicken''
585           Performs a thickening operation. This operation "thickens"
586           objects avoiding their fusion. Its implemented as a thinning
587           of the background. That is, thinning on negated image.
588           Finally a diagonal fill operation is performed to avoid
589           "eight-connecting" objects.
590
591     `'thin''
592           Performs a thinning operation. When n=Inf, thinning sets
593           pixels to 0 such that an object without holes is converted to
594           a stroke equidistant from its nearest outer boundaries. If
595           the object has holes it creates a ring midway between each
596           hole and its near outer boundary. This differ from shrink in
597           that shrink converts objects without holes to a single pixels
598           and thin to a stroke. It preserves Euler number.
599
600     `'tophat''
601           Performs a top hat operation, a opening operation (which is an
602           erosion followed by a dilation) and finally substracts the
603           original image.
604
605      Some useful concepts to understant operators:
606
607      Operations are defined on 3-by-3 blocks of data, where the pixel in
608      the center of the block. Those pixels are numerated as follows:
609
610      X3  X2  X1
611      X4  X   X0
612      X5  X6  X7
613
614      *Neighbourhood definitions used in operation descriptions:*
615     `'four-connected''
616           It refers to pixels which are connected horizontally or
617           vertically to X: X1, X3, X5 and X7.
618
619     `'eight-connected''
620           It refers to all pixels which are connected to X: X0, X1, X2,
621           X3, X4, X5, X6 and X7.
622
623      *Compatibility notes:*
624     `'fill''
625           Checking MATLAB behaviour is needed because its documentation
626           doesn't make clear if it creates a black pixel if all
627           eight-connected pixels are black or if four-connected suffice
628           (as we do currently following Pratt's book).
629
630     `'skel''
631           Algorithm used here is described in Pratt's book. When
632           applying it to the "circles" image in MATLAB documentation,
633           results are not the same. Perhaps MATLAB uses Blum's algoritm
634           (for further info please read comments in code).
635
636     `'skel-pratt''
637           This option is not available in MATLAB.
638
639     `'skel-lantuejoul''
640           This option is not available in MATLAB.
641
642     `'thicken''
643           This implementation also thickens image borders. This can
644           easily be avoided i necessary. MATLAB documentation doesn't
645           state how it behaves.
646
647      References: W. K. Pratt, "Digital Image Processing" Gonzalez and
648      Woods, "Digital Image Processing"
649
650      See also: dilate, erode, makelut, applylut
651
652
653
654
655
656 # name: <cell-element>
657 # type: sq_string
658 # elements: 1
659 # length: 52
660 Perform a morphological operation on a binary image.
661
662
663
664 # name: <cell-element>
665 # type: sq_string
666 # elements: 1
667 # length: 7
668 bwperim
669
670
671 # name: <cell-element>
672 # type: sq_string
673 # elements: 1
674 # length: 401
675  -- Function File: BW2 = bwperim(BW1)
676  -- Function File: BW2 = bwperim(BW1, N)
677      Find the perimeter of objects in binary images.
678
679      A pixel is part of an object perimeter if its value is one and
680      there is at least one zero-valued pixel in its neighborhood.
681
682      By default the neighborhood of a pixel is 4 nearest pixels, but if
683      N is set to 8 the 8 nearest pixels will be considered.
684
685
686
687
688 # name: <cell-element>
689 # type: sq_string
690 # elements: 1
691 # length: 47
692 Find the perimeter of objects in binary images.
693
694
695
696 # name: <cell-element>
697 # type: sq_string
698 # elements: 1
699 # length: 8
700 bwselect
701
702
703 # name: <cell-element>
704 # type: sq_string
705 # elements: 1
706 # length: 431
707  -- Function File: [IMOUT, IDX] = bwselect(IM, COLS, ROWS, CONNECT)
708      Select connected regions in a binary image.
709
710     `IM'
711           binary input image
712
713     `[COLS, ROWS]'
714           vectors of starting points (x,y)
715
716     `CONNECT'
717           connectedness 4 or 8. default is 8
718
719     `IMOUT'
720           the image of all objects in image im that overlap pixels in
721           (cols,rows)
722
723     `IDX'
724           index of pixels in imout
725
726
727
728
729 # name: <cell-element>
730 # type: sq_string
731 # elements: 1
732 # length: 43
733 Select connected regions in a binary image.
734
735
736
737 # name: <cell-element>
738 # type: sq_string
739 # elements: 1
740 # length: 9
741 cmpermute
742
743
744 # name: <cell-element>
745 # type: sq_string
746 # elements: 1
747 # length: 768
748  -- Function File: [Y, NEWMAP] =  cmpermute (X,MAP)
749  -- Function File: [Y, NEWMAP] =  cmpermute (X,MAP,INDEX)
750      Reorders colors in a colormap.
751
752      `[Y,newmap]=cmpermute(X,map)' rearranges colormap MAP randomly
753      returning colormap NEWMAP and generates indexed image Y so that it
754      mantains correspondence between indices and the colormap from
755      original indexed image X (both image and colormap pairs produce
756      the same result).
757
758      `[Y,newmap]=cmpermute(X,map,index)' behaves as described above but
759      instead of sorting colors randomly, it uses INDEX to define the
760      order of the colors in the new colormap.
761
762      *Note:* `index' shouldn't have repeated elements, this function
763      won't explicitly check this, but it will fail if it has.
764
765
766
767
768
769 # name: <cell-element>
770 # type: sq_string
771 # elements: 1
772 # length: 30
773 Reorders colors in a colormap.
774
775
776
777 # name: <cell-element>
778 # type: sq_string
779 # elements: 1
780 # length: 8
781 cmunique
782
783
784 # name: <cell-element>
785 # type: sq_string
786 # elements: 1
787 # length: 1496
788  -- Function File: [Y, NEWMAP] =  cmunique (X,MAP)
789  -- Function File: [Y, NEWMAP] =  cmunique (RGB)
790  -- Function File: [Y, NEWMAP] =  cmunique (I)
791      Finds colormap with unique colors and corresponding image.
792
793      `[Y,newmap]=cmunique(X,map)' returns an indexed image Y along with
794      its associated colormap NEWMAP equivalent (which produce the same
795      image) to supplied X and its colormap MAP; but eliminating any
796      repeated rows in colormap colors and adjusting indices in the
797      image matrix as needed.
798
799      `[Y,newmap]=cmunique(RGB)' returns an indexed image Y along with
800      its associated colormap NEWMAP computed from a true-color image
801      RGB (a m-by-n-by-3 array), where NEWMAP is the smallest colormap
802      possible (alhough it could be as long as number of pixels in
803      image).
804
805      `[Y,newmap]=cmunique(I)' returns an indexed image Y along with its
806      associated colormap NEWMAP computed from a intensity image I,
807      where NEWMAP is the smallest colormap possible (alhough it could
808      be as long as number of pixels in image).
809
810      *Notes:*
811
812      NEWMAP is always a M-by-3 matrix, even if input image is a
813      intensity grey-scale image I (all three RGB planes are assigned
814      the same value).
815
816      NEWMAP is always of class double. If we use a RGB or intensity
817      image of class uint8 or uint16, the colors in the colormap will be
818      of class double in the range [0,1] (they are divided by
819      intmax("uint8") and intmax("uint16") respectively.
820
821
822
823
824
825 # name: <cell-element>
826 # type: sq_string
827 # elements: 1
828 # length: 58
829 Finds colormap with unique colors and corresponding image.
830
831
832
833 # name: <cell-element>
834 # type: sq_string
835 # elements: 1
836 # length: 6
837 col2im
838
839
840 # name: <cell-element>
841 # type: sq_string
842 # elements: 1
843 # length: 959
844  -- Function File: A =  col2im (B, [M,N], [MM,NN], BLOCK_TYPE)
845  -- Function File: A =  col2im (B, [M,N], [MM,NN])
846      Rearranges matrix columns into blocks.
847
848      `A=col2im(B,[m,n],[mm,nn],block_type)' rearranges columns of
849      matrix B intro blocks in a way controlled by BLOCK_TYPE param,
850      which can take the following values:
851
852     `distinct'
853           It uses M-by-N distinct blocks (which are not overlapped),
854           and are rearranged to form a MM-by-NN matrix A. B's height
855           must be M*N and `col2im' rearranges each column to a M-by-N
856           block and uses them to fill the whole matrix in left-to-right
857           and then up-to-down order.
858
859     `sliding'
860           Is uses M-by-N sliding blocks. It rearranges row vector B to
861           a (MM-M+1)-by-(NN-N+1) matrix A. B must be a
862           1-by-(MM-M+1)*(NN-N+1).
863
864      `A=col2im(B,[m,n],[mm,nn])' takes `distinct' as a default value
865      for BLOCK_TYPE.
866
867      See also: im2col
868
869
870
871
872
873 # name: <cell-element>
874 # type: sq_string
875 # elements: 1
876 # length: 38
877 Rearranges matrix columns into blocks.
878
879
880
881 # name: <cell-element>
882 # type: sq_string
883 # elements: 1
884 # length: 7
885 colfilt
886
887
888 # name: <cell-element>
889 # type: sq_string
890 # elements: 1
891 # length: 1041
892  -- Function File: colfilt (A, [R, C], [M, N], 'sliding', F,...)
893      Apply filter to matrix blocks
894
895      For each R x C overlapping subblock of A, add a column in matrix C
896       F(C,...) should return a row vector which is then reshaped into a
897       a matrix of size A and returned. A is processed in chunks of size
898      M x N.
899
900  -- Function File: colfilt (A, [R, C], [M, N], 'distinct', F,...)
901      For each R x C non-overlapping subblock of A, add a column in
902      matrix C   F(C,...) should return a matrix of size C each column
903      of which is   placed back into the subblock from whence it came. A
904      is processed   in chunks of size M x N.
905
906      The present version requires that [M, N] divide size(A), but for
907      compatibility it should work even if [M, N] does not divide A. Use
908      the following instead:
909           [r, c] = size(A);
910           padA = zeros (m*ceil(r/m),n*ceil(c/n));
911           padA(1:r,1:c) = A;
912           B = colfilt(padA,...);
913           B = B(1:r,1:c);
914
915      The present version does not handle 'distinct'
916
917
918
919
920 # name: <cell-element>
921 # type: sq_string
922 # elements: 1
923 # length: 30
924 Apply filter to matrix blocks
925
926
927
928
929 # name: <cell-element>
930 # type: sq_string
931 # elements: 1
932 # length: 13
933 colorgradient
934
935
936 # name: <cell-element>
937 # type: sq_string
938 # elements: 1
939 # length: 541
940  -- Function File: M = colorgradient(C, W, N)
941      Define a colour map which smoothly traverses the given colors.  C
942      contains the colours, one row per r,g,b value.  W(i) is the
943      relative length of the transition from colour i to colour i+1 in
944      the entire gradient.  The default is ones(rows(C)-1,1).  n is the
945      length of the colour map.  The default is rows(colormap).
946
947      E.g.,
948           colorgradient([0,0,1; 1,1,0; 1,0,0])  # blue -> yellow -> red
949           x = linspace(0,1,200);
950           imagesc(x(:,ones(30,1)))';
951
952
953
954
955 # name: <cell-element>
956 # type: sq_string
957 # elements: 1
958 # length: 62
959 Define a colour map which smoothly traverses the given colors.
960
961
962
963 # name: <cell-element>
964 # type: sq_string
965 # elements: 1
966 # length: 7
967 conndef
968
969
970 # name: <cell-element>
971 # type: sq_string
972 # elements: 1
973 # length: 478
974  -- Function File: CONN =  conndef (NUM_DIMS, TYPE)
975      Creates a connectivity array.
976
977      `conn=conndef(num_dims,type)' creates a connectivity array (CONN)
978      of NUM_DIMS dimensions and which type is defined by TYPE as
979      follows:
980     `minimal'
981           Neighbours touch the central element on a
982           (NUM_DIMS-1)-dimensional surface.
983
984     `maximal'
985           Neighbours touch the central element in any way. Equivalent to
986           `ones(repmat(3,1,NUM_DIMS))'.
987
988
989
990
991
992 # name: <cell-element>
993 # type: sq_string
994 # elements: 1
995 # length: 29
996 Creates a connectivity array.
997
998
999
1000 # name: <cell-element>
1001 # type: sq_string
1002 # elements: 1
1003 # length: 5
1004 corr2
1005
1006
1007 # name: <cell-element>
1008 # type: sq_string
1009 # elements: 1
1010 # length: 184
1011  -- Function File: R = corr2 (I,J)
1012      Returns the correlation coefficient between I and J.  I, J must be
1013      real type matrices or vectors of same size.
1014
1015      See also: cov, std2
1016
1017
1018
1019
1020
1021 # name: <cell-element>
1022 # type: sq_string
1023 # elements: 1
1024 # length: 52
1025 Returns the correlation coefficient between I and J.
1026
1027
1028
1029 # name: <cell-element>
1030 # type: sq_string
1031 # elements: 1
1032 # length: 6
1033 dilate
1034
1035
1036 # name: <cell-element>
1037 # type: sq_string
1038 # elements: 1
1039 # length: 939
1040  -- Function File: BW2 =  dilate (BW1,SE)
1041  -- Function File: BW2 =  dilate (BW1,SE,ALG)
1042  -- Function File: BW2 =  dilate (BW1,SE,...,N)
1043      Perform a dilation morphological operation on a binary image.
1044
1045      BW2 = dilate(BW1, SE) returns a binary image with the result of a
1046      dilation operation on BW1 using neighbour mask SE.
1047
1048      For each point in BW1, dilate search its neighbours (which are
1049      defined by setting to 1 their in SE). If any of its neighbours is
1050      on (1), then pixel is set to 1. If all are off (0) then it is set
1051      to 0.
1052
1053      Center of SE is calculated using floor((size(SE)+1)/2).
1054
1055      Pixels outside the image are considered to be 0.
1056
1057      BW2 = dilate(BW1, SE, alg) returns the result of a dilation
1058      operation using algorithm ALG. Only 'spatial' is implemented at
1059      the moment.
1060
1061      BW2 = dilate(BW1, SE, ..., n) returns the result of N dilation
1062      operations on BW1.
1063
1064      See also: erode
1065
1066
1067
1068
1069
1070 # name: <cell-element>
1071 # type: sq_string
1072 # elements: 1
1073 # length: 61
1074 Perform a dilation morphological operation on a binary image.
1075
1076
1077
1078 # name: <cell-element>
1079 # type: sq_string
1080 # elements: 1
1081 # length: 4
1082 edge
1083
1084
1085 # name: <cell-element>
1086 # type: sq_string
1087 # elements: 1
1088 # length: 6148
1089  -- Function File: BW = edge (IM, METHOD)
1090  -- Function File: BW = edge (IM, METHOD, ARG1, ARG2)
1091  -- Function File: [BW, THRESH] = edge (...)
1092      Detect edges in the given image using various methods. The first
1093      input IM is the gray scale image in which edges are to be
1094      detected. The second argument controls which method is used for
1095      detecting the edges. The rest of the input arguments depend on the
1096      selected method. The first output BW is a `logical' image
1097      containing the edges. Most methods also returns an automatically
1098      computed threshold as the second output.
1099
1100      The METHOD input argument can any of the following strings (the
1101      default value is "Sobel")
1102
1103     "Sobel"
1104           Finds the edges in IM using the Sobel approximation to the
1105           derivatives. Edge points are defined as points where the
1106           length of the gradient exceeds a threshold and is larger than
1107           it's neighbours in either the horizontal or vertical
1108           direction. The threshold is passed to the method in the third
1109           input argument ARG1. If one is not given, a threshold is
1110           automatically computed as 4*M, where M is the mean of the
1111           gradient of the entire image. The optional 4th input argument
1112           controls the direction in which the gradient is approximated.
1113           It can be either "horizontal", "vertical", or "both"
1114           (default).
1115
1116     "Prewitt"
1117           Finds the edges in IM using the Prewitt approximation to the
1118           derivatives. This method works just like "Sobel" except a
1119           different aproximation the gradient is used.
1120
1121     "Roberts"
1122           Finds the edges in IM using the Roberts approximation to the
1123           derivatives. Edge points are defined as points where the
1124           length of the gradient exceeds a threshold and is larger than
1125           it's neighbours in either the horizontal or vertical
1126           direction. The threshold is passed to the method in the third
1127           input argument ARG1. If one is not given, a threshold is
1128           automatically computed as 6*M, where M is the mean of the
1129           gradient of the entire image. The optional 4th input argument
1130           can be either "thinning" (default) or "nothinning". If it is
1131           "thinning" a simple thinning procedure is applied to the edge
1132           image such that the edges are only one pixel wide. If ARG2 is
1133           "nothinning", this procedure is not applied.
1134
1135     "Kirsch"
1136           Finds the edges in IM using the Kirsch approximation to the
1137           derivatives. Edge points are defined as points where the
1138           length of the gradient exceeds a threshold and is larger than
1139           it's neighbours in either the horizontal or vertical
1140           direction. The threshold is passed to the method in the third
1141           input argument ARG1. If one is not given, a threshold is
1142           automatically computed as M, where M is the mean of the
1143           gradient of the entire image. The optional 4th input argument
1144           controls the direction in which the gradient is approximated.
1145           It can be either "horizontal", "vertical", or "both"
1146           (default).
1147
1148     "LoG"
1149           Finds edges in IM by convolving with the Laplacian of
1150           Gaussian (LoG) filter, and finding zero crossings. Only zero
1151           crossings where the filter response is larger than an
1152           automatically computed threshold are retained.  The threshold
1153           is passed to the method in the third input argument ARG1.  If
1154           one is not given, a threshold is automatically computed as
1155           0.75*M, where M is the mean of absolute value of LoG filter
1156           response. The optional 4th input argument sets the spread of
1157           the LoG filter. By default this value is 2.
1158
1159     "Zerocross"
1160           Finds edges in the image IM by convolving it with the
1161           user-supplied filter ARG2 and finding zero crossings larger
1162           than the threshold ARG1. If ARG1 is [] a threshold is
1163           computed as the mean value of the absolute filter response.
1164
1165     "Canny"
1166           Finds edges using the Canny edge detector. The optional third
1167           input argument ARG1 sets the thresholds used in the
1168           hysteresis thresholding. If ARG1 is a two dimensional vector
1169           it's first element is used as the lower threshold, while the
1170           second element is used as the high threshold. If, on the
1171           other hand, ARG1 is a single scalar it is used as the high
1172           threshold, while the lower threshold is 0.4*ARG1. The
1173           optional 4th input argument ARG2 is the spread of the
1174           low-pass Gaussian filter that is used to smooth the input
1175           image prior to estimating gradients. By default this scale
1176           parameter is 2.
1177
1178     "Lindeberg"
1179           Finds edges using in IM using the differential geometric
1180           single-scale edge detector given by Tony Lindeberg. The
1181           optional third input argument ARG1 is the scale (spread of
1182           Gaussian filter) at which the edges are computed. By default
1183           this 2.
1184
1185     "Andy"
1186           A.Adler's idea (c) 1999. Somewhat based on the canny method.
1187           The steps are
1188             1. Do a Sobel edge detection and to generate an image at a
1189                high and low threshold.
1190
1191             2. Edge extend all edges in the LT image by several pixels,
1192                in the vertical, horizontal, and 45 degree directions.
1193                Combine these into edge extended (EE) image.
1194
1195             3. Dilate the EE image by 1 step.
1196
1197             4. Select all EE features that are connected to features in
1198                the HT image.
1199
1200           The parameters for the method is given in a vector:
1201          params(1)==0 or 4 or 8
1202                Perform x connected dilatation (step 3).
1203
1204          params(2)
1205                Dilatation coeficient (threshold) in step 3.
1206
1207          params(3)
1208                Length of edge extention convolution (step 2).
1209
1210          params(4)
1211                Coeficient of extention convolution in step 2.
1212           defaults = [8, 1, 3, 3]
1213
1214
1215      See also: fspecial, nonmax_supress
1216
1217
1218
1219
1220
1221 # name: <cell-element>
1222 # type: sq_string
1223 # elements: 1
1224 # length: 54
1225 Detect edges in the given image using various methods.
1226
1227
1228
1229 # name: <cell-element>
1230 # type: sq_string
1231 # elements: 1
1232 # length: 7
1233 entropy
1234
1235
1236 # name: <cell-element>
1237 # type: sq_string
1238 # elements: 1
1239 # length: 582
1240  -- Function File: E = entropy (IM)
1241  -- Function File: E = entropy (IM, NBINS)
1242      Computes the entropy of an image.
1243
1244      The entropy of the elements of the image IM is computed as
1245
1246           E = -sum (P .* log2 (P)
1247
1248      where P is the distribution of the elements of IM. The distribution
1249      is approximated using a histogram with NBINS cells. If IM is
1250      `logical' then two cells are used by default. For other classes
1251      256 cells are used by default.
1252
1253      When the entropy is computed, zero-valued cells of the histogram
1254      are ignored.
1255
1256      See also: entropyfilt
1257
1258
1259
1260
1261
1262 # name: <cell-element>
1263 # type: sq_string
1264 # elements: 1
1265 # length: 33
1266 Computes the entropy of an image.
1267
1268
1269
1270 # name: <cell-element>
1271 # type: sq_string
1272 # elements: 1
1273 # length: 11
1274 entropyfilt
1275
1276
1277 # name: <cell-element>
1278 # type: sq_string
1279 # elements: 1
1280 # length: 1194
1281  -- Function File: E = entropyfilt (IM)
1282  -- Function File: E = entropyfilt (IM, DOMAIN)
1283  -- Function File: E = entropyfilt (IM, DOMAIN, PADDING, ...)
1284      Computes the local entropy in a neighbourhood around each pixel in
1285      an image.
1286
1287      The entropy of the elements of the neighbourhood is computed as
1288
1289           E = -sum (P .* log2 (P)
1290
1291      where P is the distribution of the elements of IM. The distribution
1292      is approximated using a histogram with NBINS cells. If IM is
1293      `logical' then two cells are used. For other classes 256 cells are
1294      used.
1295
1296      When the entropy is computed, zero-valued cells of the histogram
1297      are ignored.
1298
1299      The neighbourhood is defined by the DOMAIN binary mask. Elements
1300      of the mask with a non-zero value are considered part of the
1301      neighbourhood. By default a 9 by 9 matrix containing only non-zero
1302      values is used.
1303
1304      At the border of the image, extrapolation is used. By default
1305      symmetric extrapolation is used, but any method supported by the
1306      `padarray' function can be used. Since extrapolation is used, one
1307      can expect a lower entropy near the image border.
1308
1309      See also: entropy, paddarray, stdfilt
1310
1311
1312
1313
1314
1315 # name: <cell-element>
1316 # type: sq_string
1317 # elements: 1
1318 # length: 76
1319 Computes the local entropy in a neighbourhood around each pixel in an
1320 image.
1321
1322
1323
1324 # name: <cell-element>
1325 # type: sq_string
1326 # elements: 1
1327 # length: 5
1328 erode
1329
1330
1331 # name: <cell-element>
1332 # type: sq_string
1333 # elements: 1
1334 # length: 919
1335  -- Function File: BW2 =  erode (BW1,SE)
1336  -- Function File: BW2 =  erode (BW1,SE,ALG)
1337  -- Function File: BW2 =  erode (BW1,SE,...,N)
1338      Perform an erosion morphological operation on a binary image.
1339
1340      BW2 = erosion(BW1, SE) returns a binary image with the result of
1341      an erosion operation on BW1 using neighbour mask SE.
1342
1343      For each point in BW1, erode searchs its neighbours (which are
1344      defined by setting to 1 their in SE). If all neighbours are on
1345      (1), then pixel is set to 1. If any is off (0) then it is set to 0.
1346
1347      Center of SE is calculated using floor((size(SE)+1)/2).
1348
1349      Pixels outside the image are considered to be 0.
1350
1351      BW2 = erode(BW1, SE, alg) returns the result of a erosion operation
1352      using algorithm ALG. Only 'spatial' is implemented at the moment.
1353
1354      BW2 = erosion(BW1, SE, ..., n) returns the result of N erosion
1355      operations on BW1.
1356
1357      See also: dilate
1358
1359
1360
1361
1362
1363 # name: <cell-element>
1364 # type: sq_string
1365 # elements: 1
1366 # length: 61
1367 Perform an erosion morphological operation on a binary image.
1368
1369
1370
1371 # name: <cell-element>
1372 # type: sq_string
1373 # elements: 1
1374 # length: 7
1375 fchcode
1376
1377
1378 # name: <cell-element>
1379 # type: sq_string
1380 # elements: 1
1381 # length: 778
1382  -- Function File: FCC =  fchcode (BOUND)
1383      Determine the Freeman chain code for a boundary.
1384
1385      `fchcode' computes the Freeman chain code for the N-connected
1386      boundary BOUND. N must be either 8 or 4.
1387
1388      BOUND is a K-by-2 matrix containing the row/column coordinates of
1389      points on the boundary. Optionally, the first point can be
1390      repeated as the last point, resulting in a (K+1)-by-2 matrix.
1391
1392      FCC is a structure containing the following elements.
1393
1394            x0y0   = Row/column coordinates where the code starts (1-by-2)
1395            fcc    = Freeman chain code (1-by-K)
1396            diff   = First difference of fcc (1-by-K)
1397
1398      The code uses the following directions.
1399
1400            3 2 1
1401            4 . 0
1402            5 6 7
1403
1404      See also: bwboundaries
1405
1406
1407
1408
1409
1410 # name: <cell-element>
1411 # type: sq_string
1412 # elements: 1
1413 # length: 48
1414 Determine the Freeman chain code for a boundary.
1415
1416
1417
1418 # name: <cell-element>
1419 # type: sq_string
1420 # elements: 1
1421 # length: 8
1422 fftconv2
1423
1424
1425 # name: <cell-element>
1426 # type: sq_string
1427 # elements: 1
1428 # length: 353
1429  -- Function File: fftconv2 (A, B, SHAPE)
1430  -- Function File: fftconv2 (V1, V2, A, SHAPE)
1431      Convolve 2 dimensional signals using the FFT.
1432
1433      This method is faster but less accurate than CONV2 for large A and
1434      B.  It also uses more memory. A small complex component will be
1435      introduced even if both A and B are real.
1436
1437      See also: conv2
1438
1439
1440
1441
1442
1443 # name: <cell-element>
1444 # type: sq_string
1445 # elements: 1
1446 # length: 45
1447 Convolve 2 dimensional signals using the FFT.
1448
1449
1450
1451 # name: <cell-element>
1452 # type: sq_string
1453 # elements: 1
1454 # length: 8
1455 fspecial
1456
1457
1458 # name: <cell-element>
1459 # type: sq_string
1460 # elements: 1
1461 # length: 3242
1462  -- Function File: FILTER =  fspecial(TYPE, ARG1, ARG2)
1463      Create spatial filters for image processing.
1464
1465      TYPE determines the shape of the filter and can be
1466     "average"
1467           Rectangular averaging filter. The optional argument ARG1
1468           controls the size of the filter. If ARG1 is an integer N, a N
1469           by N filter is created. If it is a two-vector with elements N
1470           and M, the resulting filter will be N by M. By default a 3 by
1471           3 filter is created.
1472
1473     "disk"
1474           Circular averaging filter. The optional argument ARG1
1475           controls the radius of the filter. If ARG1 is an integer N, a
1476           2 N + 1 filter is created. By default a radius of 5 is used.
1477
1478     "gaussian"
1479           Gaussian filter. The optional argument ARG1 controls the size
1480           of the filter. If ARG1 is an integer N, a N by N filter is
1481           created. If it is a two-vector with elements N and M, the
1482           resulting filter will be N by M. By default a 3 by 3 filter is
1483           created. The optional argument ARG2 sets spread of the
1484           filter. By default a spread of 0.5 is used.
1485
1486     "log"
1487           Laplacian of Gaussian. The optional argument ARG1 controls
1488           the size of the filter. If ARG1 is an integer N, a N by N
1489           filter is created. If it is a two-vector with elements N and
1490           M, the resulting filter will be N by M. By default a 5 by 5
1491           filter is created. The optional argument ARG2 sets spread of
1492           the filter. By default a spread of 0.5 is used.
1493
1494     "laplacian"
1495           3x3 approximation of the laplacian. The filter is
1496           approximated as
1497                (4/(ALPHA+1))*[ALPHA/4,     (1-ALPHA)/4, ALPHA/4; ...
1498                               (1-ALPHA)/4, -1,          (1-ALPHA)/4;  ...
1499                               ALPHA/4,     (1-ALPHA)/4, ALPHA/4];
1500           where ALPHA is a number between 0 and 1. This number can be
1501           controlled via the optional input argument ARG1. By default
1502           it is 0.2.
1503
1504     "unsharp"
1505           Sharpening filter. The following filter is returned
1506                (1/(ALPHA+1))*[-ALPHA,   ALPHA-1, -ALPHA; ...
1507                                ALPHA-1, ALPHA+5,  ALPHA-1; ...
1508                               -ALPHA,   ALPHA-1, -ALPHA];
1509           where ALPHA is a number between 0 and 1. This number can be
1510           controlled via the optional input argument ARG1. By default
1511           it is 0.2.
1512
1513     "motion"
1514           Moion blur filter of width 1 pixel. The optional input
1515           argument ARG1 controls the length of the filter, which by
1516           default is 9. The argument ARG2 controls the angle of the
1517           filter, which by default is 0 degrees.
1518
1519     "sobel"
1520           Horizontal Sobel edge filter. The following filter is returned
1521                [ 1,  2,  1;
1522                  0,  0,  0;
1523                 -1, -2, -1 ]
1524
1525     "prewitt"
1526           Horizontal Prewitt edge filter. The following filter is
1527           returned
1528                [ 1,  1,  1;
1529                  0,  0,  0;
1530                 -1, -1, -1 ]
1531
1532     "kirsch"
1533           Horizontal Kirsch edge filter. The following filter is
1534           returned
1535                [ 3,  3,  3;
1536                  3,  0,  3;
1537                 -5, -5, -5 ]
1538
1539
1540
1541
1542 # name: <cell-element>
1543 # type: sq_string
1544 # elements: 1
1545 # length: 44
1546 Create spatial filters for image processing.
1547
1548
1549
1550 # name: <cell-element>
1551 # type: sq_string
1552 # elements: 1
1553 # length: 9
1554 grayslice
1555
1556
1557 # name: <cell-element>
1558 # type: sq_string
1559 # elements: 1
1560 # length: 504
1561  -- Function File: X = grayslice (I,N)
1562  -- Function File: X = grayslice (I,V)
1563      creates an indexed image X from an intensitiy image I using
1564      multiple threshold levels.  A scalar integer value N sets the
1565      levels to
1566
1567           1  2       n-1
1568           -, -, ..., ---
1569           n  n        n
1570
1571      X = grayslice(I,5);
1572
1573      For irregular threshold values a real vector V can be used.  The
1574      values must be in the range [0,1].
1575
1576      X = grayslice(I,[0.1,0.33,0.75,0.9])
1577
1578      See also: im2bw
1579
1580
1581
1582
1583
1584 # name: <cell-element>
1585 # type: sq_string
1586 # elements: 1
1587 # length: 80
1588 creates an indexed image X from an intensitiy image I using multiple
1589 threshold l
1590
1591
1592
1593 # name: <cell-element>
1594 # type: sq_string
1595 # elements: 1
1596 # length: 10
1597 graythresh
1598
1599
1600 # name: <cell-element>
1601 # type: sq_string
1602 # elements: 1
1603 # length: 542
1604  -- Function File: LEVEL= graythresh (I)
1605      Compute global image threshold using Otsu's method.
1606
1607      The output LEVEL is a global threshold (level) that can be used to
1608      convert an intensity image to a binary image with `im2bw'.  LEVEL
1609      is a normalized intensity value that lies in the range [0, 1].
1610
1611      The function uses Otsu's method, which chooses the threshold to
1612      minimize the intraclass variance of the black and white pixels.
1613
1614      Color images are converted grayscale before LEVEL is computed.
1615
1616      See also: im2bw
1617
1618
1619
1620
1621
1622 # name: <cell-element>
1623 # type: sq_string
1624 # elements: 1
1625 # length: 51
1626 Compute global image threshold using Otsu's method.
1627
1628
1629
1630 # name: <cell-element>
1631 # type: sq_string
1632 # elements: 1
1633 # length: 6
1634 histeq
1635
1636
1637 # name: <cell-element>
1638 # type: sq_string
1639 # elements: 1
1640 # length: 282
1641  -- Function File: J = histeq (I, N)
1642      Histogram equalization of a gray-scale image. The histogram
1643      contains N bins, which defaults to 64.
1644
1645      I: Image in double format, with values from 0.0 to 1.0
1646
1647      J: Returned image, in double format as well
1648
1649      See also: imhist
1650
1651
1652
1653
1654
1655 # name: <cell-element>
1656 # type: sq_string
1657 # elements: 1
1658 # length: 45
1659 Histogram equalization of a gray-scale image.
1660
1661
1662
1663 # name: <cell-element>
1664 # type: sq_string
1665 # elements: 1
1666 # length: 12
1667 hough_circle
1668
1669
1670 # name: <cell-element>
1671 # type: sq_string
1672 # elements: 1
1673 # length: 776
1674  -- Function File: ACCUM = hough_circle (BW, R)
1675      Perform the Hough transform for circles with radius R on the
1676      black-and-white image BW.
1677
1678      As an example, the following shows how to compute the Hough
1679      transform for circles with radius 3 or 7 in the image IM
1680           bw = edge(im);
1681           accum = hough_circle(bw, [3, 7]);
1682      If IM is an NxM image ACCUM will be an NxMx2 array, where
1683      ACCUM(:,:,1) will contain the Hough transform for circles with
1684      radius 3, and ACCUM(:,:,2) for radius 7. To find good circles you
1685      now need to find local maximas in ACCUM, which can be a hard
1686      problem.  If you find a local maxima in ACCUM(row, col, 1) it
1687      means that a good circle exists with center (row,col) and radius 3.
1688
1689      See also: houghtf
1690
1691
1692
1693
1694
1695 # name: <cell-element>
1696 # type: sq_string
1697 # elements: 1
1698 # length: 80
1699 Perform the Hough transform for circles with radius R on the
1700 black-and-white ima
1701
1702
1703
1704 # name: <cell-element>
1705 # type: sq_string
1706 # elements: 1
1707 # length: 7
1708 houghtf
1709
1710
1711 # name: <cell-element>
1712 # type: sq_string
1713 # elements: 1
1714 # length: 2203
1715  -- Function File: H = houghtf (BW)
1716  -- Function File: H = houghtf (BW, METHOD)
1717  -- Function File: H = houghtf (BW, METHOD, ARG)
1718      Perform the Hough transform for lines or circles.
1719
1720      The METHOD argument chooses between the Hough transform for lines
1721      and circles. It can be either "line" (default) or "circle".
1722
1723      *Line Detection*
1724
1725      If METHOD is "line", the function will compute the Hough transform
1726      for lines. A line is parametrised in R and THETA as
1727           R = x*cos(THETA) + y*sin(THETA),
1728      where R is distance between the line and the origin, while THETA
1729      is the angle of the vector from the origin to this closest point.
1730      The result H is an N by M matrix containing the Hough transform.
1731      Here, N is the number different values of R that has been
1732      attempted.  This is computed as `2*diag_length - 1', where
1733      `diag_length' is the length of the diagonal of the input image. M
1734      is the number of different values of THETA. These can be set
1735      through the third input argument ARG. This must be a vector of
1736      real numbers, and is by default `pi*(-90:90)/180'.
1737
1738      *Circle Detection*
1739
1740      If METHOD is "circle" the function will compute the Hough
1741      transform for circles. The circles are parametrised in R which
1742      denotes the radius of the circle. The third input argument ARG
1743      must be a real vector containing the possible values of R.  If the
1744      input image is N by M, then the result H will be an N by M by K
1745      array, where K denotes the number of different values of R.
1746
1747      As an example, the following shows how to compute the Hough
1748      transform for circles with radius 3 or 7 in the image IM
1749           bw = edge(im);
1750           H = houghtf(bw, "circle", [3, 7]);
1751      Here H will be an NxMx2 array, where H(:,:,1) will contain the
1752      Hough transform for circles with radius 3, and H(:,:,2) for radius
1753      7.  To find good circles you now need to find local maximas in H.
1754      If you find a local maxima in H(row, col, 1) it means that a good
1755      circle exists with center (row,col) and radius 3. One way to
1756      locate maximas is to use the `immaximas' function.
1757
1758      See also: hough_line, hough_circle, immaximas
1759
1760
1761
1762
1763
1764 # name: <cell-element>
1765 # type: sq_string
1766 # elements: 1
1767 # length: 49
1768 Perform the Hough transform for lines or circles.
1769
1770
1771
1772 # name: <cell-element>
1773 # type: sq_string
1774 # elements: 1
1775 # length: 5
1776 im2bw
1777
1778
1779 # name: <cell-element>
1780 # type: sq_string
1781 # elements: 1
1782 # length: 213
1783  -- Function File: BW = im2bw (I,threshold)
1784  -- Function File: BW = im2bw (X,CMAP,threshold)
1785      Converts image data types to a black-white (binary) image.  The
1786      treshold value should be in the range [0,1].
1787
1788
1789
1790
1791 # name: <cell-element>
1792 # type: sq_string
1793 # elements: 1
1794 # length: 58
1795 Converts image data types to a black-white (binary) image.
1796
1797
1798
1799 # name: <cell-element>
1800 # type: sq_string
1801 # elements: 1
1802 # length: 6
1803 im2col
1804
1805
1806 # name: <cell-element>
1807 # type: sq_string
1808 # elements: 1
1809 # length: 1681
1810  -- Function File: B =  im2col (A, [M,N], BLOCK_TYPE)
1811  -- Function File: B =  im2col (A, [M,N])
1812  -- Function File: B =  im2col (A, 'indexed', ...)
1813      Rearranges image blocks into columns.
1814
1815      `B=im2col(A, [m, n], blocktype)' rearranges blocks in A into
1816      columns in a way that's determined by BLOCK_TYPE, which can take
1817      the following values:
1818
1819     `distinct'
1820           Rearranges each distinct M-by-N block in image A into a
1821           column of B. Blocks are scanned from left to right and the up
1822           to bottom in A, and columns are added to B from left to
1823           right. If A's size is not multiple M-by-N it is padded.
1824
1825     `sliding'
1826           Rearranges any M-by-N sliding block of A in a column of B,
1827           without any padding, so only sliding blocks which can be
1828           built using a full M-by-N neighbourhood are taken.  In
1829           consequence, B has M*N rows and (MM-M+1)*(NN-N+1) columns
1830           (where MM and NN are the size of A).
1831
1832           This case is thought to be used applying operations on
1833           columns of B (for instance using sum(:)), so that result is a
1834           1-by-(MM-M+1)*(NN-N+1) vector, that is what the complementary
1835           function `col2im' expects.
1836
1837      `B=im2col(A,[m,n])' takes `distinct' as a default value for
1838      BLOCK_TYPE.
1839
1840      `B=im2col(A,'indexed',...)' will treat A as an indexed image, so
1841      it will pad using 1 if A is double. All other cases (incluing
1842      indexed matrices with uint8 and uint16 types and non-indexed
1843      images) will use 0 as padding value.
1844
1845      Any padding needed in 'distinct' processing will be added at right
1846      and bottom edges of the image.
1847
1848      See also: col2im
1849
1850
1851
1852
1853
1854 # name: <cell-element>
1855 # type: sq_string
1856 # elements: 1
1857 # length: 37
1858 Rearranges image blocks into columns.
1859
1860
1861
1862 # name: <cell-element>
1863 # type: sq_string
1864 # elements: 1
1865 # length: 9
1866 im2double
1867
1868
1869 # name: <cell-element>
1870 # type: sq_string
1871 # elements: 1
1872 # length: 417
1873  -- Function File: IM2 = im2double(IM1)
1874      Converts the input image to an image of class double.
1875
1876      If the input image is of class double the output is unchanged.  If
1877      the input is of class uint8 the result will be converted to doubles
1878      and divided by 255, and if the input is of class uint16 the image
1879      will be converted to doubles and divided by 65535.
1880
1881      See also: im2bw, im2uint16, im2uint8
1882
1883
1884
1885
1886
1887 # name: <cell-element>
1888 # type: sq_string
1889 # elements: 1
1890 # length: 53
1891 Converts the input image to an image of class double.
1892
1893
1894
1895 # name: <cell-element>
1896 # type: sq_string
1897 # elements: 1
1898 # length: 9
1899 im2uint16
1900
1901
1902 # name: <cell-element>
1903 # type: sq_string
1904 # elements: 1
1905 # length: 421
1906  -- Function File: IM2 = im2uint16(IM1)
1907      Converts the input image to an image of class uint16.
1908
1909      If the input image is of class uint16 the output is unchanged.  If
1910      the input is of class uint8 the result will be converted to uint16
1911      and multiplied by 257, and if the input is of class double the
1912      image will be multiplied by 65535 and converted to uint16.
1913
1914      See also: im2bw, im2double, im2uint8
1915
1916
1917
1918
1919
1920 # name: <cell-element>
1921 # type: sq_string
1922 # elements: 1
1923 # length: 53
1924 Converts the input image to an image of class uint16.
1925
1926
1927
1928 # name: <cell-element>
1929 # type: sq_string
1930 # elements: 1
1931 # length: 8
1932 im2uint8
1933
1934
1935 # name: <cell-element>
1936 # type: sq_string
1937 # elements: 1
1938 # length: 413
1939  -- Function File: IM2 = im2uint8(IM1)
1940      Converts the input image to an image of class uint8.
1941
1942      If the input image is of class uint8 the output is unchanged.  If
1943      the input is of class double the result will be multiplied by 255
1944      and converted to uint8, and if the input is of class uint16 the
1945      image will be divided by 257 and converted to uint8.
1946
1947      See also: im2bw, im2uint16, im2double
1948
1949
1950
1951
1952
1953 # name: <cell-element>
1954 # type: sq_string
1955 # elements: 1
1956 # length: 52
1957 Converts the input image to an image of class uint8.
1958
1959
1960
1961 # name: <cell-element>
1962 # type: sq_string
1963 # elements: 1
1964 # length: 8
1965 imadjust
1966
1967
1968 # name: <cell-element>
1969 # type: sq_string
1970 # elements: 1
1971 # length: 3594
1972  -- Function File: J = imadjust (I)
1973  -- Function File: J = imadjust (I,[LOW_IN;HIGH_IN])
1974  -- Function File: J = imadjust (I,[LOW_IN;HIGH_IN],[LOW_OUT;HIGH_OUT])
1975  -- Function File: J = imadjust (..., GAMMA)
1976  -- Function File: NEWMAP = imadjust (MAP, ...)
1977  -- Function File: RGB_OUT = imadjust (RGB, ...)
1978      Adjust image or colormap values to a specified range.
1979
1980      `J=imadjust(I)' adjusts intensity image I values so that 1% of
1981      data on lower and higher values (2% in total) of the image is
1982      saturated; choosing for that the corresponding lower and higher
1983      bounds (using `stretchlim') and mapping them to 0 and 1. J is an
1984      image of the same size as I which contains mapped values.  This is
1985      equivalent to `imadjust(I,stretchlim(I))'.
1986
1987      `J=imadjust(I,[low_in;high_in])' behaves as described but uses
1988      LOW_IN and HIGH_IN values instead of calculating them. It maps
1989      those values to 0 and 1; saturates values lower than first limit
1990      to 0 and values higher than second to 1; and finally maps all
1991      values between limits linearly to a value between 0 and 1. If `[]'
1992      is passes as `[low_in;high_in]' value, then `[0;1]' is taken as a
1993      default value.
1994
1995      `J=imadjust(I,[low_in;high_in],[low_out;high_out])' behaves as
1996      described but maps output values between LOW_OUT and HIGH_OUT
1997      instead of 0 and 1. A default value `[]' can also be used for this
1998      parameter, which is taken as `[0;1]'.
1999
2000      `J=imadjust(...,gamma)' takes, in addition of 3 parameters
2001      explained above, an extra parameter GAMMA, which specifies the
2002      shape of the mapping curve between input elements and output
2003      elements, which is linear (as taken if this parameter is omitted).
2004      If GAMMA is above 1, then function is weighted towards lower
2005      values, and if below 1, towards higher values.
2006
2007      `newmap=imadjust(map,...)' applies a transformation to a colormap
2008      MAP, which output is NEWMAP. This transformation is the same as
2009      explained above, just using a map instead of an image.  LOW_IN,
2010      HIGH_IN, LOW_OUT, HIGH_OUT and GAMMA can be scalars, in which case
2011      the same values are applied for all three color components of a
2012      map; or it can be 1-by-3 vectors, to define unique mappings for
2013      each component.
2014
2015      `RGB_out=imadjust(RGB,...)' adjust RGB image RGB (a M-by-N-by-3
2016      array) the same way as specified in images and colormaps.  Here
2017      too LOW_IN, HIGH_IN, LOW_OUT, HIGH_OUT and GAMMA can be scalars or
2018      1-by-3 matrices, to specify the same mapping for all planes, or
2019      unique mappings for each.
2020
2021      The formula used to realize the mapping (if we omit saturation) is:
2022
2023      `J = low_out + (high_out - low_out) .* ((I - low_in) / (high_in -
2024      low_in)) .^ gamma;'
2025
2026      *Compatibility notes:*
2027
2028         * Prior versions of imadjust allowed `[low_in; high_in]' and
2029           `[low_out; high_out]' to be row vectors. Compatibility with
2030           this behaviour has been keeped, although preferred form is
2031           vertical vector (since it extends nicely to 2-by-3 matrices
2032           for RGB images and colormaps).
2033
2034         * Previous version of imadjust, if `low_in>high_in' it
2035           "negated" output.  Now it is negated if `low_out>high_out',
2036           for compatibility with MATLAB.
2037
2038         * Class of I is not considered, so limit values are not
2039           modified depending on class of the image, just treated "as
2040           is". When Octave 2.1.58 is out, limits will be multiplied by
2041           255 for uint8 images and by 65535 for uint16 as in MATLAB.
2042
2043      See also: stretchlim, brighten
2044
2045
2046
2047
2048
2049 # name: <cell-element>
2050 # type: sq_string
2051 # elements: 1
2052 # length: 53
2053 Adjust image or colormap values to a specified range.
2054
2055
2056
2057 # name: <cell-element>
2058 # type: sq_string
2059 # elements: 1
2060 # length: 7
2061 imclose
2062
2063
2064 # name: <cell-element>
2065 # type: sq_string
2066 # elements: 1
2067 # length: 370
2068  -- Function File: B = imclose (A, SE)
2069      Perform morphological closing on a given image.  The image A must
2070      be a grayscale or binary image, and SE must be a structuring
2071      element.
2072
2073      The closing corresponds to a dilation followed by an erosion of
2074      the image, i.e.
2075           B = imerode(imdilate(A, se), se);
2076
2077      See also: imdilate, imerode, imclose
2078
2079
2080
2081
2082
2083 # name: <cell-element>
2084 # type: sq_string
2085 # elements: 1
2086 # length: 47
2087 Perform morphological closing on a given image.
2088
2089
2090
2091 # name: <cell-element>
2092 # type: sq_string
2093 # elements: 1
2094 # length: 12
2095 imcomplement
2096
2097
2098 # name: <cell-element>
2099 # type: sq_string
2100 # elements: 1
2101 # length: 344
2102  -- Function File: B = imcomplement(A)
2103      Computes the complement image. Intuitively this corresponds to the
2104      intensity of bright and dark regions being reversed.
2105
2106      For binary images, the complement is computed as `!A', for floating
2107      point images it is computed as `1 - A', and for integer images as
2108      `intmax(class(A)) - A'.
2109
2110
2111
2112
2113 # name: <cell-element>
2114 # type: sq_string
2115 # elements: 1
2116 # length: 30
2117 Computes the complement image.
2118
2119
2120
2121 # name: <cell-element>
2122 # type: sq_string
2123 # elements: 1
2124 # length: 8
2125 imdilate
2126
2127
2128 # name: <cell-element>
2129 # type: sq_string
2130 # elements: 1
2131 # length: 328
2132  -- Function File: B = imdilate (A, SE)
2133      Perform morphological dilation on a given image.
2134
2135      The image A must be a grayscale or binary image, and SE must be a
2136      structuring element. Both must have the same class, e.g., if A is a
2137      logical matrix, SE must also be logical.
2138
2139      See also: imerode, imopen, imclose
2140
2141
2142
2143
2144
2145 # name: <cell-element>
2146 # type: sq_string
2147 # elements: 1
2148 # length: 48
2149 Perform morphological dilation on a given image.
2150
2151
2152
2153 # name: <cell-element>
2154 # type: sq_string
2155 # elements: 1
2156 # length: 8
2157 imdither
2158
2159
2160 # name: <cell-element>
2161 # type: sq_string
2162 # elements: 1
2163 # length: 1030
2164  -- Function File: [Y, NEWMAP] =  imdither (IMG)
2165  -- Function File: [Y, NEWMAP] =  imdither (IMG, COLORS)
2166  -- Function File: [Y, NEWMAP] =  imdither (IMG, COLORS, DITHTYPE)
2167  -- Function File: [Y, NEWMAP] =  imdither (IMG, MAP)
2168  -- Function File: [Y, NEWMAP] =  imdither (IMG, MAP, COLORS)
2169  -- Function File: [Y, NEWMAP] =  imdither(IMG, MAP, COLORS, DITHTYPE)
2170      Reduce the number a colors of rgb or indexed image.
2171
2172      Note: this requires the ImageMagick "convert" utility.  get this
2173      from www.imagemagick.org if required additional documentation of
2174      options is available from the convert man page.
2175
2176      where DITHTYPE is a value from list:
2177
2178         * "None"
2179
2180         * "FloydSteinberg" (default)
2181
2182         * "Riemersma"
2183
2184      COLORS is a maximum number of colors in result map
2185
2186      TODO: Add facility to use already created colormap over "-remap"
2187      option
2188
2189      BUGS: This function return a 0-based indexed images when colormap
2190      size is lower or equals to 256 like at cmunique code
2191
2192      See also: cmunique
2193
2194
2195
2196
2197
2198 # name: <cell-element>
2199 # type: sq_string
2200 # elements: 1
2201 # length: 51
2202 Reduce the number a colors of rgb or indexed image.
2203
2204
2205
2206 # name: <cell-element>
2207 # type: sq_string
2208 # elements: 1
2209 # length: 7
2210 imerode
2211
2212
2213 # name: <cell-element>
2214 # type: sq_string
2215 # elements: 1
2216 # length: 327
2217  -- Function File: B = imerode (A, SE)
2218      Perform morphological erosion on a given image.
2219
2220      The image A must be a grayscale or binary image, and SE must be a
2221      structuring element. Both must have the same class, e.g., if A is a
2222      logical matrix, SE must also be logical.
2223
2224      See also: imdilate, imopen, imclose
2225
2226
2227
2228
2229
2230 # name: <cell-element>
2231 # type: sq_string
2232 # elements: 1
2233 # length: 47
2234 Perform morphological erosion on a given image.
2235
2236
2237
2238 # name: <cell-element>
2239 # type: sq_string
2240 # elements: 1
2241 # length: 8
2242 imfilter
2243
2244
2245 # name: <cell-element>
2246 # type: sq_string
2247 # elements: 1
2248 # length: 1460
2249  -- Function File: J = imfilter(I, F)
2250  -- Function File: J = imfilter(I, F, OPTIONS, ...)
2251      Computes the linear filtering of the image I and the filter F.
2252      The computation is performed using double precision floating point
2253      numbers, but the class of the input image is preserved as the
2254      following example shows.
2255           I = 255*ones(100, 100, "uint8");
2256           f = fspecial("average", 3);
2257           J = imfilter(I, f);
2258           class(J)
2259           => ans = uint8
2260
2261      The function also accepts a number of optional arguments that
2262      control the details of the filtering. The following options is
2263      currently accepted
2264     `S'
2265           If a scalar input argument is given, the image is padded with
2266           this scalar as part of the filtering. The default value is 0.
2267
2268     `"symmetric"'
2269           The image is padded symmetrically.
2270
2271     `"replicate"'
2272           The image is padded using the border of the image.
2273
2274     `"circular"'
2275           The image is padded by circular repeating of the image
2276           elements.
2277
2278     `"same"'
2279           The size of the output image is the same as the input image.
2280           This is the default behaviour.
2281
2282     `"full"'
2283           Returns the full filtering result.
2284
2285     `"corr"'
2286           The filtering is performed using correlation. This is the
2287           default behaviour.
2288
2289     `"conv"'
2290           The filtering is performed using convolution.
2291
2292      See also: conv2, filter2, fspecial, padarray
2293
2294
2295
2296
2297
2298 # name: <cell-element>
2299 # type: sq_string
2300 # elements: 1
2301 # length: 62
2302 Computes the linear filtering of the image I and the filter F.
2303
2304
2305
2306 # name: <cell-element>
2307 # type: sq_string
2308 # elements: 1
2309 # length: 7
2310 imginfo
2311
2312
2313 # name: <cell-element>
2314 # type: sq_string
2315 # elements: 1
2316 # length: 376
2317  -- Function File: HW = imginfo (FILENAME)
2318  -- Function File: [H, W] = imginfo (FILENAME)
2319      Get image size from file FILENAME.
2320
2321      The output is the size of the image
2322     `H'
2323           Height of image, in pixels.
2324
2325     `W'
2326           Width  of image, in pixels.
2327
2328     `HW = [H, W]'
2329           Height and width of image.
2330
2331      NOTE : imginfo relies on the 'convert' program.
2332
2333
2334
2335
2336 # name: <cell-element>
2337 # type: sq_string
2338 # elements: 1
2339 # length: 34
2340 Get image size from file FILENAME.
2341
2342
2343
2344 # name: <cell-element>
2345 # type: sq_string
2346 # elements: 1
2347 # length: 6
2348 imhist
2349
2350
2351 # name: <cell-element>
2352 # type: sq_string
2353 # elements: 1
2354 # length: 213
2355  -- Function File:  imhist (I,N)
2356  -- Function File:  imhist (I)
2357  -- Function File:  imhist (X,CMAP)
2358  -- Function File: [N,X] =  imhist (...)
2359      Shows the histogram of an image using hist.
2360
2361      See also: hist
2362
2363
2364
2365
2366
2367 # name: <cell-element>
2368 # type: sq_string
2369 # elements: 1
2370 # length: 43
2371 Shows the histogram of an image using hist.
2372
2373
2374
2375 # name: <cell-element>
2376 # type: sq_string
2377 # elements: 1
2378 # length: 9
2379 immaximas
2380
2381
2382 # name: <cell-element>
2383 # type: sq_string
2384 # elements: 1
2385 # length: 1102
2386  -- Function File: [R, C] = immaximas (IM, RADIUS)
2387  -- Function File: [R, C] = immaximas (IM, RADIUS, THRESH)
2388  -- Function File: [R, C, ...] = immaximas (...)
2389  -- Function File: [..., VAL] = immaximas (...)
2390      Finds local spatial maximas of the given image. A local spatial
2391      maxima is defined as an image point with a value that is larger
2392      than all neighbouring values in a square region of width
2393      2*RADIUS+1. By default RADIUS is 1, such that a 3 by 3
2394      neighbourhood is searched. If the THRESH input argument is
2395      supplied, only local maximas with a value greater than THRESH are
2396      retained.
2397
2398      The output vectors R and C contain the row-column coordinates of
2399      the local maximas. The actual values are computed to sub-pixel
2400      precision by fitting a parabola to the data around the pixel. If
2401      IM is N-dimensional, then N vectors will be returned.
2402
2403      If IM is N-dimensional, and N+1 outputs are requested, then the
2404      last output will contain the image values at the maximas. Currently
2405      this value is not interpolated.
2406
2407      See also: ordfilt2, ordfiltn
2408
2409
2410
2411
2412
2413 # name: <cell-element>
2414 # type: sq_string
2415 # elements: 1
2416 # length: 47
2417 Finds local spatial maximas of the given image.
2418
2419
2420
2421 # name: <cell-element>
2422 # type: sq_string
2423 # elements: 1
2424 # length: 7
2425 imnoise
2426
2427
2428 # name: <cell-element>
2429 # type: sq_string
2430 # elements: 1
2431 # length: 490
2432  -- Function File: B = imnoise (A, TYPE)
2433      Adds noise to image in A.
2434
2435     `imnoise (A, 'gaussian' [, mean [, var]])'
2436           additive gaussian noise: B = A + noise defaults to mean=0,
2437           var=0.01
2438
2439     `imnoise (A, 'salt & pepper' [, density])'
2440           lost pixels: A = 0 or 1 for density*100% of the pixels
2441           defaults to density=0.05, or 5%
2442
2443     `imnoise (A, 'speckle' [, var])'
2444           multiplicative gaussian noise: B = A + A*noise defaults to
2445           var=0.04
2446
2447
2448
2449
2450 # name: <cell-element>
2451 # type: sq_string
2452 # elements: 1
2453 # length: 25
2454 Adds noise to image in A.
2455
2456
2457
2458 # name: <cell-element>
2459 # type: sq_string
2460 # elements: 1
2461 # length: 6
2462 imopen
2463
2464
2465 # name: <cell-element>
2466 # type: sq_string
2467 # elements: 1
2468 # length: 369
2469  -- Function File: B = imopen (A, SE)
2470      Perform morphological opening on a given image.  The image A must
2471      be a grayscale or binary image, and SE must be a structuring
2472      element.
2473
2474      The opening corresponds to an erosion followed by a dilation of
2475      the image, i.e.
2476           B = imdilate(imerode(A, se), se);
2477
2478      See also: imdilate, imerode, imclose
2479
2480
2481
2482
2483
2484 # name: <cell-element>
2485 # type: sq_string
2486 # elements: 1
2487 # length: 47
2488 Perform morphological opening on a given image.
2489
2490
2491
2492 # name: <cell-element>
2493 # type: sq_string
2494 # elements: 1
2495 # length: 5
2496 impad
2497
2498
2499 # name: <cell-element>
2500 # type: sq_string
2501 # elements: 1
2502 # length: 986
2503  -- Function File:  impad(A, XPAD, YPAD, [PADDING, [CONST]])
2504      Pad (augment) a matrix for application of image processing
2505      algorithms.
2506
2507      Pads the input image A with XPAD(1) elements from left, XPAD(2),
2508      elements from right, YPAD(1) elements from above and YPAD(2)
2509      elements from below.  Values of padding elements are determined
2510      from the optional arguments PADDING and CONST. PADDING is one of
2511
2512     `"zeros"'
2513           pad with zeros (default)
2514
2515     `"ones"'
2516           pad with ones
2517
2518     `"constant"'
2519           pad with a value obtained from the optional fifth argument
2520           const
2521
2522     `"symmetric"'
2523           pad with values obtained from A so that the padded image
2524           mirrors A starting from edges of A
2525
2526     `"reflect"'
2527           same as symmetric, but the edge rows and columns are not used
2528           in the padding
2529
2530     `"replicate"'
2531           pad with values obtained from A so that the padded image
2532           repeates itself in two dimensions
2533
2534
2535
2536
2537
2538 # name: <cell-element>
2539 # type: sq_string
2540 # elements: 1
2541 # length: 70
2542 Pad (augment) a matrix for application of image processing algorithms.
2543
2544
2545
2546 # name: <cell-element>
2547 # type: sq_string
2548 # elements: 1
2549 # length: 17
2550 imperspectivewarp
2551
2552
2553 # name: <cell-element>
2554 # type: sq_string
2555 # elements: 1
2556 # length: 1744
2557  -- Function File: WARPED = imperspectivewarp(IM, P, INTERP, BBOX,
2558           EXTRAPVAL)
2559  -- Function File: [ WARPED, VALID] = imperspectivewarp(...)
2560      Applies the spatial perspective homogeneous transformation P to
2561      the image IM.  The transformation matrix P must be a 3x3
2562      homogeneous matrix, or 2x2 or 2x3 affine transformation matrix.
2563
2564      The resulting image WARPED is computed using an interpolation
2565      method that can be selected through the INTERP argument. This must
2566      be one of the following strings
2567     `"nearest"'
2568           Nearest neighbor interpolation.
2569
2570     `"linear"'
2571     `"bilinear"'
2572           Bilinear interpolation. This is the default behavior.
2573
2574     `"cubic"'
2575     `"bicubic"'
2576           Bicubic interpolation.
2577
2578      By default the resulting image contains the entire warped image.
2579      In some situation you only parts of the warped image. The argument
2580      BBOX controls this, and can be one of the following strings
2581     `"loose"'
2582           The entire warped result is returned. This is the default
2583           behavior.
2584
2585     `"crop"'
2586           The central part of the image of the same size as the input
2587           image is returned.
2588
2589     `"same"'
2590           The size and coordinate system of the input image is keept.
2591
2592      All values of the result that fall outside the original image will
2593      be set to EXTRAPVAL. For images of class `double' EXTRAPVAL
2594      defaults to `NA' and for other classes it defaults to 0.
2595
2596      The optional output VALID is a matrix of the same size as WARPED
2597      that contains the value 1 in pixels where WARPED contains an
2598      interpolated value, and 0 in pixels where WARPED contains an
2599      extrapolated value.
2600
2601      See also: imremap, imrotate, imresize, imshear, interp2
2602
2603
2604
2605
2606
2607 # name: <cell-element>
2608 # type: sq_string
2609 # elements: 1
2610 # length: 77
2611 Applies the spatial perspective homogeneous transformation P to the
2612 image IM.
2613
2614
2615
2616 # name: <cell-element>
2617 # type: sq_string
2618 # elements: 1
2619 # length: 7
2620 imremap
2621
2622
2623 # name: <cell-element>
2624 # type: sq_string
2625 # elements: 1
2626 # length: 1386
2627  -- Function File: WARPED = imremap(IM, XI, YI)
2628  -- Function File: WARPED = imremap(IM, XI, YI, INTERP, EXTRAPVAL)
2629  -- Function File: [ WARPED, VALID ] = imremap(...)
2630      Applies any geometric transformation to the image IM.
2631
2632      The arguments XI and YI are lookup tables that define the resulting
2633      image
2634           WARPED(y,x) = IM(YI(y,x), XI(y,x))
2635      where IM is assumed to be a continuous function, which is achieved
2636      by interpolation. Note that the image IM is expressed in a (X,
2637      Y)-coordinate system and not a (row, column) system.
2638
2639      The argument INTERP selects the used interpolation method, and
2640      most be one of the following strings
2641     `"nearest"'
2642           Nearest neighbor interpolation.
2643
2644     `"linear"'
2645     `"bilinear"'
2646           Bilinear interpolation. This is the default behavior.
2647
2648     `"cubic"'
2649     `"bicubic"'
2650           Bicubic interpolation.
2651
2652      All values of the result that fall outside the original image will
2653      be set to EXTRAPVAL. For images of class `double' EXTRAPVAL
2654      defaults to `NA' and for other classes it defaults to 0.
2655
2656      The optional output VALID is a matrix of the same size as WARPED
2657      that contains the value 1 in pixels where WARPED contains an
2658      interpolated value, and 0 in pixels where WARPED contains an
2659      extrapolated value.
2660
2661      See also: imperspectivewarp, imrotate, imresize, imshear, interp2
2662
2663
2664
2665
2666
2667 # name: <cell-element>
2668 # type: sq_string
2669 # elements: 1
2670 # length: 53
2671 Applies any geometric transformation to the image IM.
2672
2673
2674
2675 # name: <cell-element>
2676 # type: sq_string
2677 # elements: 1
2678 # length: 8
2679 imresize
2680
2681
2682 # name: <cell-element>
2683 # type: sq_string
2684 # elements: 1
2685 # length: 821
2686  -- Function File: B = imresize (A, M)
2687      Scales the image A by a factor M using bicubic neighbour
2688      interpolation. If M is less than 1 the image size will be reduced,
2689      and if M is greater than 1 the image will be enlarged.
2690
2691  -- Function File: B = imresize (A, M, INTERP)
2692      Same as above except INTERP interpolation is performed instead of
2693      using nearest neighbour. INTERP can be any interpolation method
2694      supported by interp2.  By default, bicubic interpolation is used.
2695
2696  -- Function File: B = imresize (A, [MROW MCOL])
2697      Scales the image A to be of size MROWxMCOL.
2698
2699  -- Function File: B = imresize (A, [MROW MCOL], INTERP)
2700      Same as above except INTERP interpolation is performed. INTERP can
2701      be any interpolation method supported by interp2.
2702
2703      See also: imremap, imrotate, interp2
2704
2705
2706
2707
2708
2709 # name: <cell-element>
2710 # type: sq_string
2711 # elements: 1
2712 # length: 71
2713 Scales the image A by a factor M using bicubic neighbour interpolation.
2714
2715
2716
2717 # name: <cell-element>
2718 # type: sq_string
2719 # elements: 1
2720 # length: 8
2721 imrotate
2722
2723
2724 # name: <cell-element>
2725 # type: sq_string
2726 # elements: 1
2727 # length: 2137
2728  -- Function File:  imrotate(IMGPRE, THETA, METHOD, BBOX, EXTRAPVAL)
2729      Rotation of a 2D matrix about its center.
2730
2731      Input parameters:
2732
2733      IMGPRE   a gray-level image matrix
2734
2735      THETA    the rotation angle in degrees counterclockwise
2736
2737      METHOD
2738           "nearest" neighbor: fast, but produces aliasing effects
2739           (default).
2740
2741           "bilinear" interpolation: does anti-aliasing, but is slightly
2742           slower.
2743
2744           "bicubic" interpolation: does anti-aliasing, preserves edges
2745           better than bilinear interpolation, but gray levels may
2746           slightly overshoot at sharp edges. This is probably the best
2747           method for most purposes, but also the slowest.
2748
2749           "Fourier" uses Fourier interpolation, decomposing the
2750           rotation matrix into 3 shears. This method often results in
2751           different artifacts than homography-based methods.  Instead
2752           of slightly blurry edges, this method can result in ringing
2753           artifacts (little waves near high-contrast edges).  However,
2754           Fourier interpolation is better at maintaining the image
2755           information, so that unrotating will result in an image
2756           closer to the original than the other methods.
2757
2758      BBOX
2759           "loose" grows the image to accommodate the rotated image
2760           (default).
2761
2762           "crop" rotates the image about its center, clipping any part
2763           of the image that is moved outside its boundaries.
2764
2765      EXTRAPVAL sets the value used for extrapolation. The default value
2766          is `NA' for images represented using doubles, and 0 otherwise.
2767          This argument is ignored of Fourier interpolation is used.
2768
2769      Output parameters:
2770
2771      IMGPOST  the rotated image matrix
2772
2773      H        the homography mapping original to rotated pixel
2774              coordinates. To map a coordinate vector c = [x;y] to its
2775             rotated location, compute round((H * [c; 1])(1:2)).
2776
2777      VALID    a binary matrix describing which pixels are valid,
2778               and which pixels are extrapolated. This output is
2779              not available if Fourier interpolation is used.
2780
2781
2782
2783
2784 # name: <cell-element>
2785 # type: sq_string
2786 # elements: 1
2787 # length: 41
2788 Rotation of a 2D matrix about its center.
2789
2790
2791
2792 # name: <cell-element>
2793 # type: sq_string
2794 # elements: 1
2795 # length: 16
2796 imrotate_Fourier
2797
2798
2799 # name: <cell-element>
2800 # type: sq_string
2801 # elements: 1
2802 # length: 579
2803  -- Function File:  imrotate(M, THETA, METHOD, BBOX)
2804      Rotation of a 2D matrix.
2805
2806      Applies a rotation of THETA degrees to matrix M.
2807
2808      The METHOD argument is not implemented, and is only included for
2809      compatibility with Matlab.  This function uses Fourier
2810      interpolation, decomposing the rotation matrix into 3 shears.
2811
2812      BBOX can be either 'loose' or 'crop'.  'loose' allows the image to
2813      grow to accomodate the rotated image.  'crop' keeps the same size
2814      as the original, clipping any part of the image that is moved
2815      outside the bounding box.
2816
2817
2818
2819
2820 # name: <cell-element>
2821 # type: sq_string
2822 # elements: 1
2823 # length: 24
2824 Rotation of a 2D matrix.
2825
2826
2827
2828 # name: <cell-element>
2829 # type: sq_string
2830 # elements: 1
2831 # length: 7
2832 imshear
2833
2834
2835 # name: <cell-element>
2836 # type: sq_string
2837 # elements: 1
2838 # length: 1176
2839  -- Function File:  imshear (M, AXIS, ALPHA, BBOX)
2840      Applies a shear to the image M.
2841
2842      The argument M is either a matrix or an RGB image.
2843
2844      AXIS is the axis along which the shear is to be applied, and can
2845      be either 'x' or 'y'.  For example, to shear sideways is to shear
2846      along the 'x' axis. Choosing 'y' causes an up/down shearing.
2847
2848      ALPHA is the slope of the shear. For an 'x' shear, it is the
2849      horizontal shift (in pixels) applied to the pixel above the
2850      center. For a 'y' shear, it is the vertical shift (in pixels)
2851      applied to the pixel just to the right of the center pixel.
2852
2853      NOTE: ALPHA does NOT need to be an integer.
2854
2855      BBOX can be one of 'loose', 'crop' or 'wrap'.  'loose' allows the
2856      image to grow to accomodate the new transformed image.  'crop'
2857      keeps the same size as the original, clipping any part of the image
2858      that is moved outside the bounding box.  'wrap' keeps the same
2859      size as the original, but does not clip the part of the image that
2860      is outside the bounding box. Instead, it wraps it back into the
2861      image.
2862
2863      If called with only 3 arguments, BBOX is set to 'loose' by default.
2864
2865
2866
2867
2868 # name: <cell-element>
2869 # type: sq_string
2870 # elements: 1
2871 # length: 31
2872 Applies a shear to the image M.
2873
2874
2875
2876 # name: <cell-element>
2877 # type: sq_string
2878 # elements: 1
2879 # length: 8
2880 imsmooth
2881
2882
2883 # name: <cell-element>
2884 # type: sq_string
2885 # elements: 1
2886 # length: 7353
2887  -- Function File: J = imsmooth(I, NAME, OPTIONS)
2888      Smooth the given image using several different algorithms.
2889
2890      The first input argument I is the image to be smoothed. If it is
2891      an RGB image, each color plane is treated separately.  The
2892      variable NAME must be a string that determines which algorithm will
2893      be used in the smoothing. It can be any of the following strings
2894
2895     "Gaussian"
2896           Isotropic Gaussian smoothing. This is the default.
2897
2898     "Average"
2899           Smoothing using a rectangular averaging linear filter.
2900
2901     "Disk"
2902           Smoothing using a circular averaging linear filter.
2903
2904     "Median"
2905           Median filtering.
2906
2907     "Bilateral"
2908           Gaussian bilateral filtering.
2909
2910     "Perona & Malik"
2911     "Perona and Malik"
2912     "P&M"
2913           Smoothing using nonlinear isotropic diffusion as described by
2914           Perona and Malik.
2915
2916     "Custom Gaussian"
2917           Gaussian smoothing with a spatially varying covariance matrix.
2918
2919      In all algorithms the computation is done in double precision
2920      floating point numbers, but the result has the same type as the
2921      input. Also, the size of the smoothed image is the same as the
2922      input image.
2923
2924      *Isotropic Gaussian smoothing*
2925
2926      The image is convolved with a Gaussian filter with spread SIGMA.
2927      By default SIGMA is 0.5, but this can be changed. If the third
2928      input argument is a scalar it is used as the filter spread.
2929
2930      The image is extrapolated symmetrically before the convolution
2931      operation.
2932
2933      *Rectangular averaging linear filter*
2934
2935      The image is convolved with N by M rectangular averaging filter.
2936      By default a 3 by 3 filter is used, but this can e changed. If the
2937      third input argument is a scalar N a N by N filter is used. If the
2938      third input argument is a two-vector `[N, M]' a N by M filter is
2939      used.
2940
2941      The image is extrapolated symmetrically before the convolution
2942      operation.
2943
2944      *Circular averaging linear filter*
2945
2946      The image is convolved with circular averaging filter. By default
2947      the filter has a radius of 5, but this can e changed. If the third
2948      input argument is a scalar R the radius will be R.
2949
2950      The image is extrapolated symmetrically before the convolution
2951      operation.
2952
2953      *Median filtering*
2954
2955      Each pixel is replaced with the median of the pixels in the local
2956      area. By default, this area is 3 by 3, but this can be changed. If
2957      the third input argument is a scalar N the area will be N by N,
2958      and if it's a two-vector [N, M] the area will be N by M.
2959
2960      The image is extrapolated symmetrically before the filtering is
2961      performed.
2962
2963      *Gaussian bilateral filtering*
2964
2965      The image is smoothed using Gaussian bilateral filtering as
2966      described by Tomasi and Manduchi [2]. The filtering result is
2967      computed as
2968           J(x0, y0) = k * SUM SUM I(x,y) * w(x, y, x0, y0, I(x0,y0), I(x,y))
2969                            x   y
2970      where `k' a normalisation variable, and
2971           w(x, y, x0, y0, I(x0,y0), I(x,y))
2972             = exp(-0.5*d([x0,y0],[x,y])^2/SIGMA_D^2)
2973               * exp(-0.5*d(I(x0,y0),I(x,y))^2/SIGMA_R^2),
2974      with `d' being the Euclidian distance function. The two paramteres
2975      SIGMA_D and SIGMA_R control the amount of smoothing. SIGMA_D is
2976      the size of the spatial smoothing filter, while SIGMA_R is the size
2977      of the range filter. When SIGMA_R is large the filter behaves
2978      almost like the isotropic Gaussian filter with spread SIGMA_D, and
2979      when it is small edges are preserved better. By default SIGMA_D is
2980      2, and SIGMA_R is 10/255 for floating points images (with integer
2981      images this is multiplied with the maximal possible value
2982      representable by the integer class).
2983
2984      The image is extrapolated symmetrically before the filtering is
2985      performed.
2986
2987      *Perona and Malik*
2988
2989      The image is smoothed using nonlinear isotropic diffusion as
2990      described by Perona and Malik [1]. The algorithm iteratively
2991      updates the image using
2992
2993           I += lambda * (g(dN).*dN + g(dS).*dS + g(dE).*dE + g(dW).*dW)
2994
2995      where `dN' is the spatial derivative of the image in the North
2996      direction, and so forth. The function G determines the behaviour
2997      of the diffusion.  If g(x) = 1 this is standard isotropic
2998      diffusion.
2999
3000      The above update equation is repeated ITER times, which by default
3001      is 10 times. If the third input argument is a positive scalar,
3002      that number of updates will be performed.
3003
3004      The update parameter LAMBDA affects how much smoothing happens in
3005      each iteration. The algorithm can only be proved stable is LAMBDA
3006      is between 0 and 0.25, and by default it is 0.25. If the fourth
3007      input argument is given this parameter can be changed.
3008
3009      The function G in the update equation determines the type of the
3010      result.  By default `G(D) = exp(-(D./K).^2)' where K = 25.  This
3011      choice gives privileges to high-contrast edges over low-contrast
3012      ones.  An alternative is to set `G(D) = 1./(1 + (D./K).^2)', which
3013      gives privileges to wide regions over smaller ones. The choice of G
3014      can be controlled through the fifth input argument. If it is the
3015      string `"method1"', the first mentioned function is used, and if
3016      it is "METHOD2" the second one is used. The argument can also be a
3017      function handle, in which case the given function is used. It
3018      should be noted that for stability reasons, G should return values
3019      between 0 and 1.
3020
3021      The following example shows how to set `G(D) = exp(-(D./K).^2)'
3022      where K = 50.  The update will be repeated 25 times, with LAMBDA =
3023      0.25.
3024
3025           G = @(D) exp(-(D./50).^2);
3026           J = imsmooth(I, "p&m", 25, 0.25, G);
3027
3028      *Custom Gaussian Smoothing*
3029
3030      The image is smoothed using a Gaussian filter with a spatially
3031      varying covariance matrix. The third and fourth input arguments
3032      contain the Eigenvalues of the covariance matrix, while the fifth
3033      contains the rotation of the Gaussian.  These arguments can be
3034      matrices of the same size as the input image, or scalars.  In the
3035      last case the scalar is used in all pixels. If the rotation is not
3036      given it defaults to zero.
3037
3038      The following example shows how to increase the size of an Gaussian
3039      filter, such that it is small near the upper right corner of the
3040      image, and large near the lower left corner.
3041
3042           [LAMBDA1, LAMBDA2] = meshgrid (linspace (0, 25, columns (I)), linspace (0, 25, rows (I)));
3043           J = imsmooth (I, "Custom Gaussian", LAMBDA1, LAMBDA2);
3044
3045      The implementation uses an elliptic filter, where only
3046      neighbouring pixels with a Mahalanobis' distance to the current
3047      pixel that is less than 3 are used to compute the response. The
3048      response is computed using double precision floating points, but
3049      the result is of the same class as the input image.
3050
3051      *References*
3052
3053      [1] P. Perona and J. Malik, "Scale-space and edge detection using
3054      anisotropic diffusion", IEEE Transactions on Pattern Analysis and
3055      Machine Intelligence, 12(7):629-639, 1990.
3056
3057      [2] C. Tomasi and R. Manduchi, "Bilateral Filtering for Gray and
3058      Color Images", Proceedings of the 1998 IEEE International
3059      Conference on Computer Vision, Bombay, India.
3060
3061      See also: imfilter, fspecial
3062
3063
3064
3065
3066
3067 # name: <cell-element>
3068 # type: sq_string
3069 # elements: 1
3070 # length: 58
3071 Smooth the given image using several different algorithms.
3072
3073
3074
3075 # name: <cell-element>
3076 # type: sq_string
3077 # elements: 1
3078 # length: 8
3079 imtophat
3080
3081
3082 # name: <cell-element>
3083 # type: sq_string
3084 # elements: 1
3085 # length: 695
3086  -- Function File: B = imtophat (A, SE)
3087  -- Function File: B = imtophat (A, SE, TYPE)
3088      Perform morphological top hat filtering.
3089
3090      The image A must be a grayscale or binary image, and SE must be a
3091      structuring element. Both must have the same class, e.g., if A is a
3092      logical matrix, SE must also be logical.
3093
3094      TYPE defines the type of top hat transform. To perform a white, or
3095      opening, top-hat transform its value must be `open' or `white'. To
3096      perform a black, or closing, top-hat transform its value must be
3097      `close' or `black'. If TYPE is not specified, it performs a white
3098      top-hat transform.
3099
3100      See also: imerode, imdilate, imopen, imclose, mmgradm
3101
3102
3103
3104
3105
3106 # name: <cell-element>
3107 # type: sq_string
3108 # elements: 1
3109 # length: 40
3110 Perform morphological top hat filtering.
3111
3112
3113
3114 # name: <cell-element>
3115 # type: sq_string
3116 # elements: 1
3117 # length: 11
3118 imtranslate
3119
3120
3121 # name: <cell-element>
3122 # type: sq_string
3123 # elements: 1
3124 # length: 273
3125  -- Function File: Y = imtranslate (M, X, Y [, BBOX])
3126      Translate a 2D image by (x,y) using Fourier interpolation.
3127
3128      M is a matrix, and is translated to the right by X pixels and
3129      translated up by Y pixels.
3130
3131      BBOX can be either 'crop' or 'wrap' (default).
3132
3133
3134
3135
3136
3137 # name: <cell-element>
3138 # type: sq_string
3139 # elements: 1
3140 # length: 58
3141 Translate a 2D image by (x,y) using Fourier interpolation.
3142
3143
3144
3145 # name: <cell-element>
3146 # type: sq_string
3147 # elements: 1
3148 # length: 6
3149 iradon
3150
3151
3152 # name: <cell-element>
3153 # type: sq_string
3154 # elements: 1
3155 # length: 2228
3156  -- Function: RECON = iradon (PROJ, THETA, INTERP, FILTER, SCALING,
3157           OUTPUT_SIZE)
3158      Performs filtered back-projection on the projections in PROJ to
3159      reconstruct an approximation of the original image.
3160
3161      PROJ should be a matrix whose columns are projections of an image
3162      (or slice).  Each element of THETA is used as the angle (in
3163      degrees) that the corresponding column of PROJ was projected at.
3164      If THETA is omitted, it is assumed that projections were taken at
3165      evenly spaced angles between 0 and 180 degrees.  THETA can also be
3166      a scalar, in which case it is taken as the angle between
3167      projections if more than one projection is provided.
3168
3169      INTERP determines the type of interpolation that is used in the
3170      back-projection.  It must be one of the types accepted by
3171      `interp1', and defaults to 'Linear' if it is omitted.
3172
3173      FILTER and SCALING determine the type of rho filter to apply.  See
3174      the help for `rho_filter' for their use.
3175
3176      OUTPUT_SIZE sets the edge length of the output image (it is always
3177      square).  This argument does not scale the image.  If it is
3178      omitted, the length is taken to be
3179      2 * floor (size (proj, 1) / (2 * sqrt (2))).
3180
3181      If PROJ was obtained using `radon', there is no guarantee that the
3182      reconstructed image will be exactly the same size as the original.
3183
3184  -- Function: [RECON, FILT] = iradon (...)
3185      This form also returns the filter frequency response in the vector
3186      FILT.
3187
3188    Performs filtered back-projection in order to reconstruct an image
3189 based on its projections.
3190
3191    Filtered back-projection is the most common means of reconstructing
3192 images from CT scans.  It is a two step process: First, each of the
3193 projections is filtered with a `rho filter', so named due to its
3194 frequency domain definition, which is simply |rho|, where rho is the
3195 radial axis in a polar coordinate system.  Second, the filtered
3196 projections are each `smeared' across the image space.  This is the
3197 back-projection part.
3198
3199    Usage example:
3200        P = phantom ();
3201        projections = radon (P, 1:179);
3202        reconstruction = iradon (filtered_projections, 1:179, 'Spline', 'Hann');
3203        figure, imshow (reconstruction, [])
3204
3205
3206
3207
3208 # name: <cell-element>
3209 # type: sq_string
3210 # elements: 1
3211 # length: 80
3212 Performs filtered back-projection on the projections in PROJ to
3213 reconstruct an a
3214
3215
3216
3217 # name: <cell-element>
3218 # type: sq_string
3219 # elements: 1
3220 # length: 4
3221 isbw
3222
3223
3224 # name: <cell-element>
3225 # type: sq_string
3226 # elements: 1
3227 # length: 128
3228  -- Function File: BOOL = isbw (BW)
3229      Returns true for a black-white (binary) image.  All values must be
3230      either 0 or 1
3231
3232
3233
3234
3235 # name: <cell-element>
3236 # type: sq_string
3237 # elements: 1
3238 # length: 46
3239 Returns true for a black-white (binary) image.
3240
3241
3242
3243 # name: <cell-element>
3244 # type: sq_string
3245 # elements: 1
3246 # length: 6
3247 isgray
3248
3249
3250 # name: <cell-element>
3251 # type: sq_string
3252 # elements: 1
3253 # length: 277
3254  -- Function File: BOOL = isgray (I)
3255      Returns true for an gray-scale intensity image. An variable is a
3256      gray scale image if it is 2-dimensional matrix, and
3257         * is of class double and all values are in the range [0, 1], or
3258
3259         * is of class uint8 or uint16.
3260
3261
3262
3263
3264 # name: <cell-element>
3265 # type: sq_string
3266 # elements: 1
3267 # length: 47
3268 Returns true for an gray-scale intensity image.
3269
3270
3271
3272 # name: <cell-element>
3273 # type: sq_string
3274 # elements: 1
3275 # length: 5
3276 isind
3277
3278
3279 # name: <cell-element>
3280 # type: sq_string
3281 # elements: 1
3282 # length: 148
3283  -- Function File: BOOL = isind (X)
3284      Returns true for an index image. All index values must be
3285      intergers and greater than  or equal to 1.
3286
3287
3288
3289
3290 # name: <cell-element>
3291 # type: sq_string
3292 # elements: 1
3293 # length: 32
3294 Returns true for an index image.
3295
3296
3297
3298 # name: <cell-element>
3299 # type: sq_string
3300 # elements: 1
3301 # length: 5
3302 isrgb
3303
3304
3305 # name: <cell-element>
3306 # type: sq_string
3307 # elements: 1
3308 # length: 607
3309  -- Function File: FLAG =  isrgb (A)
3310      Returns true if parameter is a RGB image.
3311
3312      `flag=isrgb(A)' returns 1 if A is a RGB image and 0 if not.
3313
3314      To the decide `isrgb' uses the follow algorithm:
3315         * If A is of class double then it checks if all values are
3316           between 0 and 1, and if size is m-by-n-by-3.
3317
3318         * If A is of class uint16, uint8 or logical then it checks is
3319           m-by-n-by-3.
3320
3321      *Compatibility notes:*
3322
3323      Information needed on whether MATLAB accepts logical arrays as RGB
3324      images (now this functions accepts them if they are m-by-n-by-3
3325      arrays.
3326
3327
3328
3329
3330
3331 # name: <cell-element>
3332 # type: sq_string
3333 # elements: 1
3334 # length: 41
3335 Returns true if parameter is a RGB image.
3336
3337
3338
3339 # name: <cell-element>
3340 # type: sq_string
3341 # elements: 1
3342 # length: 9
3343 label2rgb
3344
3345
3346 # name: <cell-element>
3347 # type: sq_string
3348 # elements: 1
3349 # length: 1740
3350  -- Function File: RGB = label2rgb(L)
3351  -- Function File: RGB = label2rgb(L, MAP)
3352  -- Function File: RGB = label2rgb(L, MAP, BACKGROUND)
3353  -- Function File: RGB = label2rgb(L, MAP, BACKGROUND, ORDER)
3354      Converts a labeled image to an RGB image.
3355
3356      label2rgb(L) returns a color image, where the background color
3357      (the background is the zero-labeled pixels) is white, and all other
3358      colors come from the `jet' colormap.
3359
3360      label2rgb(L, MAP) uses colors from the given colormap.  MAP can be
3361         * A string containing the name of a function to be called to
3362           produce a colormap. The default value is "jet".
3363
3364         * A handle to a function to be called to produce a colormap.
3365
3366         * A N-by-3 colormap matrix.
3367
3368      label2rgb(L, MAP, BACKGROUND) sets the background color.
3369      BACKGROUND can be a 3-vector corresponding to the wanted RGB
3370      color, or one of the following strings
3371     `"b"'
3372           The background color will be blue.
3373
3374     `"c"'
3375           The background color will be cyan.
3376
3377     `"g"'
3378           The background color will be green.
3379
3380     `"k"'
3381           The background color will be black.
3382
3383     `"m"'
3384           The background color will be magenta.
3385
3386     `"r"'
3387           The background color will be red.
3388
3389     `"w"'
3390           The background color will be white. This is the default
3391           behavior.
3392
3393     `"y"'
3394           The background color will be yellow.
3395
3396      label2rgb(L, MAP, BACKGROUND, ORDER) allows for random
3397      permutations of the colormap. ORDER must be one of the following
3398      strings
3399     `"noshuffle"'
3400           The colormap is not permuted in any ways. This is the default.
3401
3402     `"shuffle"'
3403           The used colormap is permuted randomly.
3404
3405      See also: bwlabel, ind2rgb
3406
3407
3408
3409
3410
3411 # name: <cell-element>
3412 # type: sq_string
3413 # elements: 1
3414 # length: 41
3415 Converts a labeled image to an RGB image.
3416
3417
3418
3419 # name: <cell-element>
3420 # type: sq_string
3421 # elements: 1
3422 # length: 7
3423 makelut
3424
3425
3426 # name: <cell-element>
3427 # type: sq_string
3428 # elements: 1
3429 # length: 819
3430  -- Function File: LUT =  makelut (FUN,N)
3431  -- Function File: LUT =  makelut (FUN,N,P1,P2,...)
3432      Create a lookup table which can be used by applylut.
3433
3434      lut = makelut(fun,n) returns a vector which can be used by applylut
3435      as a lookup table.
3436
3437      FUN can be a function object as created by inline, or simply a
3438      string which contains the name of a function. FUN should accept a
3439      N-by-N matrix whose elements are binary (0 or 1) and returns an
3440      scalar (actually anything suitable to be included in a vector).
3441
3442      makelut calls FUN with all possible matrices and builds a vector
3443      with its result, suitable to be used by applylut. The length of
3444      this vector is 2^(N^2), so 16 for 2-by-2 and 512 for 3-by-3.
3445
3446      makelut also passes parameters P1, P2, .... to FUN.
3447
3448      See also: applylut
3449
3450
3451
3452
3453
3454 # name: <cell-element>
3455 # type: sq_string
3456 # elements: 1
3457 # length: 52
3458 Create a lookup table which can be used by applylut.
3459
3460
3461
3462 # name: <cell-element>
3463 # type: sq_string
3464 # elements: 1
3465 # length: 8
3466 mat2gray
3467
3468
3469 # name: <cell-element>
3470 # type: sq_string
3471 # elements: 1
3472 # length: 92
3473  -- Function File: I = mat2gray (M,[min max])
3474      Converts a matrix to a intensity image.
3475
3476
3477
3478
3479 # name: <cell-element>
3480 # type: sq_string
3481 # elements: 1
3482 # length: 39
3483 Converts a matrix to a intensity image.
3484
3485
3486
3487 # name: <cell-element>
3488 # type: sq_string
3489 # elements: 1
3490 # length: 5
3491 mean2
3492
3493
3494 # name: <cell-element>
3495 # type: sq_string
3496 # elements: 1
3497 # length: 141
3498  -- Function File: M = mean2 (I)
3499      Returns the mean value for a 2d real type matrix.  Uses
3500      `mean(I(:))'
3501
3502      See also: std2, mean
3503
3504
3505
3506
3507
3508 # name: <cell-element>
3509 # type: sq_string
3510 # elements: 1
3511 # length: 49
3512 Returns the mean value for a 2d real type matrix.
3513
3514
3515
3516 # name: <cell-element>
3517 # type: sq_string
3518 # elements: 1
3519 # length: 8
3520 medfilt2
3521
3522
3523 # name: <cell-element>
3524 # type: sq_string
3525 # elements: 1
3526 # length: 533
3527  -- Function File:  medfilt2(A, [DOMAIN, PADDING])
3528      Two dimensional median filtering.
3529
3530      Replaces elements of A with the median of their neighbours defined
3531      by true elements of logical matrix DOMAIN. The default DOMAIN is a
3532      3 by 3 matrix with all elements equal to 1. If DOMAIN is 1 by 2
3533      row vector, the domain matrix will be logical(ones(DOMAIN(2),
3534      DOMAIN(1))).
3535
3536      Optional variable PADDING defines the padding used in augmenting
3537      the borders of A. See impad for details.
3538
3539      See also: ordfilt2
3540
3541
3542
3543
3544
3545 # name: <cell-element>
3546 # type: sq_string
3547 # elements: 1
3548 # length: 33
3549 Two dimensional median filtering.
3550
3551
3552
3553 # name: <cell-element>
3554 # type: sq_string
3555 # elements: 1
3556 # length: 7
3557 mmgradm
3558
3559
3560 # name: <cell-element>
3561 # type: sq_string
3562 # elements: 1
3563 # length: 598
3564  -- Function File: GRAD = mmgradm(A, SE)
3565  -- Function File: GRAD = mmgradm(A, SE_DIL, SE_ERO)
3566      Calculates the morphological gradient GRAD of a given image A.
3567
3568      In the first form, the same structuring element SE is used for
3569      dilation and erosion. In the second form, SE_DIL and SE_ERO are the
3570      corresponding structuring elements used for dilation and erosion
3571
3572      The image A must be a grayscale or a binary image.
3573
3574      The morphological gradient of a image corresponds to its erosion
3575      subtracted to its dilation.
3576
3577      See also: imerode, imdilate, imopen, imclose, imtophat
3578
3579
3580
3581
3582
3583 # name: <cell-element>
3584 # type: sq_string
3585 # elements: 1
3586 # length: 62
3587 Calculates the morphological gradient GRAD of a given image A.
3588
3589
3590
3591 # name: <cell-element>
3592 # type: sq_string
3593 # elements: 1
3594 # length: 8
3595 nlfilter
3596
3597
3598 # name: <cell-element>
3599 # type: sq_string
3600 # elements: 1
3601 # length: 1004
3602  -- Function File: B =  nlfilter (A, [M,N], FUN)
3603  -- Function File: B =  nlfilter (A, [M,N], FUN, ...)
3604  -- Function File: B =  nlfilter (A,'indexed', ...)
3605      Processes image in sliding blocks using user-supplied function.
3606
3607      `B=nlfilter(A,[m,n],fun)' passes sliding M-by-N blocks to
3608      user-supplied function FUN. A block is build for every pixel in A,
3609      such as it is centered within the block.  FUN must return a
3610      scalar, and it is used to create matrix B. NLFILTER pads the
3611      M-by-N block at the edges if necessary.
3612
3613      Center of block is taken at ceil([M,N]/2).
3614
3615      `B=nlfilter(A,[m,n],fun,...)' behaves as described above but
3616      passes extra parameters to function FUN.
3617
3618      `B=nlfilter(A,'indexed',...)' assumes that A is an indexed image,
3619      so it pads the image using proper value: 0 for uint8 and uint16
3620      images and 1 for double images. Keep in mind that if 'indexed' is
3621      not specified padding is always done using 0.
3622
3623      See also: colfilt, blkproc, inline
3624
3625
3626
3627
3628
3629 # name: <cell-element>
3630 # type: sq_string
3631 # elements: 1
3632 # length: 63
3633 Processes image in sliding blocks using user-supplied function.
3634
3635
3636
3637 # name: <cell-element>
3638 # type: sq_string
3639 # elements: 1
3640 # length: 8
3641 ordfilt2
3642
3643
3644 # name: <cell-element>
3645 # type: sq_string
3646 # elements: 1
3647 # length: 690
3648  -- Function File:  ordfilt2(A, NTH, DOMAIN, [S, PADDING])
3649      Two dimensional ordered filtering.
3650
3651      Ordered filter replaces an element of A with the NTH element of
3652      the sorted set of neighbours defined by the logical (boolean)
3653      matrix DOMAIN.  Neighbour elements are selected to the sort if the
3654      corresponding element in the DOMAIN matrix is true.
3655
3656      The optional variable S is a matrix of size(DOMAIN).  Values of S
3657      corresponding to nonzero values of domain are added to values
3658      obtained from A when doing the sorting.
3659
3660      Optional variable PADDING determines how the matrix A is padded
3661      from the edges. See impad for details.
3662
3663      See also: medfilt2
3664
3665
3666
3667
3668
3669 # name: <cell-element>
3670 # type: sq_string
3671 # elements: 1
3672 # length: 34
3673 Two dimensional ordered filtering.
3674
3675
3676
3677 # name: <cell-element>
3678 # type: sq_string
3679 # elements: 1
3680 # length: 8
3681 ordfiltn
3682
3683
3684 # name: <cell-element>
3685 # type: sq_string
3686 # elements: 1
3687 # length: 705
3688  -- Function File:  ordfiltn(A, NTH, DOMAIN, [S, PADDING])
3689      Two dimensional ordered filtering.
3690
3691      Ordered filter replaces an element of A with the NTH element of
3692      the sorted set of neighbours defined by the logical (boolean)
3693      matrix DOMAIN.  Neighbour elements are selected to the sort if the
3694      corresponding element in the DOMAIN matrix is true.
3695
3696      The optional variable S is a matrix of size(DOMAIN).  Values of S
3697      corresponding to nonzero values of domain are added to values
3698      obtained from A when doing the sorting.
3699
3700      Optional variable PADDING determines how the matrix A is padded
3701      from the edges. See `padarray' for details.
3702
3703      See also: ordfilt2, padarray
3704
3705
3706
3707
3708
3709 # name: <cell-element>
3710 # type: sq_string
3711 # elements: 1
3712 # length: 34
3713 Two dimensional ordered filtering.
3714
3715
3716
3717 # name: <cell-element>
3718 # type: sq_string
3719 # elements: 1
3720 # length: 8
3721 padarray
3722
3723
3724 # name: <cell-element>
3725 # type: sq_string
3726 # elements: 1
3727 # length: 1878
3728  -- Function File: B =  padarray (A,PADSIZE)
3729  -- Function File: B =  padarray (A,PADSIZE,PADVAL)
3730  -- Function File: B =  padarray (A,PADSIZE,PADVAL,DIRECTION)
3731      Pads an array in a configurable way.
3732
3733      B = padarray(A,padsize) pads an array A with zeros, where PADSIZE
3734      defines the amount of padding to add in each dimension (it must be
3735      a vector of positive integers).
3736
3737      Each component of PADSIZE defines the number of elements of
3738      padding that will be added in the corresponding dimension. For
3739      instance, [4,5] adds 4 elements of padding in first dimension
3740      (vertical) and 5 in second dimension (horizontal).
3741
3742      B = padarray(A,padsize,padval) pads A using the value specified by
3743      PADVAL. PADVAL can be a scalar or a string. Possible values are:
3744
3745     0
3746           Pads with 0 as described above. This is the default behaviour.
3747
3748     Scalar
3749           Pads using PADVAL as a padding value.
3750
3751     "Circular"
3752           Pads with a circular repetition of elements in A (similar to
3753           tiling A).
3754
3755     "Replicate"
3756           Pads replicating values of A which are at the border of the
3757           array.
3758
3759     "Symmetric"
3760           Pads with a mirror reflection of A.
3761
3762     "Reflect"
3763           Same as "symmetric", but the borders are not used in the
3764           padding.
3765
3766      B = padarray(A,padsize,padval,direction) pads A defining the
3767      direction of the pad. Possible values are:
3768
3769     "Both"
3770           For each dimension it pads before the first element the number
3771           of elements defined by PADSIZE and the same number again after
3772           the last element. This is the default value.
3773
3774     "Pre"
3775           For each dimension it pads before the first element the
3776           number of elements defined by PADSIZE.
3777
3778     "Post"
3779           For each dimension it pads after the last element the number
3780           of elements defined by PADSIZE.
3781
3782
3783
3784
3785 # name: <cell-element>
3786 # type: sq_string
3787 # elements: 1
3788 # length: 36
3789 Pads an array in a configurable way.
3790
3791
3792
3793 # name: <cell-element>
3794 # type: sq_string
3795 # elements: 1
3796 # length: 7
3797 phantom
3798
3799
3800 # name: <cell-element>
3801 # type: sq_string
3802 # elements: 1
3803 # length: 2255
3804  -- Function: P = phantom ('Shepp-Logan', N)
3805      Produces the Shepp-Logan phantom, with size N x N.  If N is
3806      omitted, 256 is used.
3807
3808  -- Function: P = phantom ('Modified Shepp-Logan', N)
3809      Produces a modified version of the Shepp-Logan phantom which has
3810      higher contrast than the original,  with size N x N.  If N is
3811      omitted, 256 is used.
3812
3813  -- Function: P = phantom (ELLIPSES, N)
3814      Produces a custom phantom using the ellipses described in ELLIPSES.
3815      Each row of ELLIPSES describes one ellipse, and must have 6
3816      columns: {I, a, b, x0, y0, phi}:
3817     I
3818           is the additive intensity of the ellipse
3819
3820     a
3821           is the length of the major axis
3822
3823     b
3824           is the length of the minor axis
3825
3826     x0
3827           is the horizontal offset of the centre of the ellipse
3828
3829     y0
3830           is the vercal offset of the centre of the ellipse
3831
3832     phi
3833           is the counterclockwise rotation of the ellipse in degrees,
3834           measured as the angle between the x axis and the ellipse
3835           major axis.
3836
3837
3838      The image bounding box in the algorithm is {[-1, -1], [1, 1]}, so
3839      the values of a, b, x0, y0 should all be specified with this in
3840      mind.  If N is omitted, 256 is used.
3841
3842  -- Function: P = phantom (N)
3843      Creates a modified Shepp-Logan phantom with size N x N.
3844
3845  -- Function: P =  phantom ()
3846      Creates a modified Shepp-Logan phantom with size 256 x 256.
3847
3848    Create a Shepp-Logan or modified Shepp-Logan phantom.
3849
3850    A phantom is a known object (either real or purely mathematical) that
3851 is used for testing image reconstruction algorithms.  The Shepp-Logan
3852 phantom is a popular mathematical model of a cranial slice, made up of
3853 a set of ellipses.  This allows rigorous testing of computed tomography
3854 (CT) algorithms as it can be analytically transformed with the radon
3855 transform (see the function `radon').
3856
3857    Example:
3858
3859        P = phantom (512);
3860        imshow (P, []);
3861
3862    References:
3863
3864    Shepp, L. A.; Logan, B. F.; Reconstructing Interior Head Tissue
3865 from X-Ray Transmissions, IEEE Transactions on Nuclear Science,  Feb.
3866 1974, p. 232.
3867
3868    Toft, P.; "The Radon Transform - Theory and Implementation", Ph.D.
3869 thesis,  Department of Mathematical Modelling, Technical University  of
3870 Denmark, June 1996.
3871
3872
3873
3874
3875 # name: <cell-element>
3876 # type: sq_string
3877 # elements: 1
3878 # length: 50
3879 Produces the Shepp-Logan phantom, with size N x N.
3880
3881
3882
3883 # name: <cell-element>
3884 # type: sq_string
3885 # elements: 1
3886 # length: 9
3887 poly2mask
3888
3889
3890 # name: <cell-element>
3891 # type: sq_string
3892 # elements: 1
3893 # length: 1182
3894  -- Function File: BW =  poly2mask (X,Y,M,N)
3895      Convert a polygon to a region mask.
3896
3897      BW=poly2mask(x,y,m,n) converts a polygon, specified by a list of
3898      vertices in X and Y and returns in a M-by-N logical mask BW the
3899      filled polygon. Region inside the polygon is set to 1, values
3900      outside the shape are set to 0.
3901
3902      X and Y should always represent a closed polygon, first and last
3903      points should be coincident. If they are not poly2mask will close
3904      it for you. If X or Y are fractional they are nearest integer.
3905
3906      If all the polygon or part of it falls outside the masking area
3907      (1:m,1:n), it is discarded or clipped.
3908
3909      This function uses scan-line polygon filling algorithm as described
3910      in http://www.cs.rit.edu/~icss571/filling/ with some minor
3911      modifications: capability of clipping and scan order, which can
3912      affect the results of the algorithm (algorithm is described not to
3913      reach ymax, xmax border when filling to avoid enlarging shapes). In
3914      this function we scan the image backwards (we begin at ymax and end
3915      at ymin), and we don't reach ymin, xmin, which we believe should be
3916      compatible with MATLAB.
3917
3918
3919
3920
3921 # name: <cell-element>
3922 # type: sq_string
3923 # elements: 1
3924 # length: 35
3925 Convert a polygon to a region mask.
3926
3927
3928
3929 # name: <cell-element>
3930 # type: sq_string
3931 # elements: 1
3932 # length: 8
3933 qtdecomp
3934
3935
3936 # name: <cell-element>
3937 # type: sq_string
3938 # elements: 1
3939 # length: 2390
3940  -- Function File: S =  qtdecomp (I)
3941  -- Function File: S =  qtdecomp (I,THRESHOLD)
3942  -- Function File: S =  qtdecomp (I,THRESHOLD,MINDIM)
3943  -- Function File: S =  qtdecomp (I,THRESHOLD,[MINDIM MAXDIM])
3944  -- Function File: S =  qtdecomp (I,FUN)
3945  -- Function File: S =  qtdecomp (I,FUN,P1,P2,...)
3946      Performs quadtree decomposition.
3947
3948      qtdecomp decomposes a square image I into four equal-sized blocks.
3949      Then it performs some kind of test on each block to decide if it
3950      should decompose them further. This process is repeated
3951      iteratively until there's no block left to be decomposed.
3952
3953      Note that blocks are not decomposed if their dimensions are not
3954      even.
3955
3956      The output is a sparse matrix whose non-zero elements determine the
3957      position of the block (the element is at top-left position in the
3958      block) and size of each block (the value of the element determines
3959      length of a side of the square-shaped block).
3960
3961      S = qtdecomp(I) decomposes an intensity image I as described
3962      above. By default it doesn't split a block if all elements are
3963      equal.
3964
3965      S = qtdecomp(I, threshold) decomposes an image as decribed, but
3966      only splits a block if the maximum value in the block minus the
3967      minimum value is greater than THRESHOLD, which is a value between
3968      0 and 1. If I is of class uint8, THRESHOLD is multiplied by 255
3969      before use. Also, ifI is of class uint16, THRESHOLD is multiplied
3970      by 65535.
3971
3972      S = qtdecomp(I, threshold, mindim) decomposes an image using the
3973      THRESHOLD as just described, but doesn't produce blocks smaller
3974      than mindim.
3975
3976      S = qtdecomp(I, threshold, [mindim maxdim]) decomposes an image as
3977      described, but produces blocks that can't be bigger than maxdim. It
3978      decomposes to maxdim even if it isn't needed if only THRESHOLD was
3979      considered.
3980
3981      S = qtdecomp(I, fun) decomposes an image I and uses function FUN
3982      to decide if a block should be splitted or not. FUN is called with
3983      a m-by-m-by-k  array of m-by-m blocks to be considered, and should
3984      return a vector of size k, whose elements represent each block in
3985      the stacked array. FUN sets the corresponding value to 1 if the
3986      block should be split, and 0 otherwise.
3987
3988      S = qtdecomp(I, fun, ...) behaves as qtdecomp(I, fun) but passes
3989      extra parameters to FUN.
3990
3991      See also: qtgetblk, qtsetblk
3992
3993
3994
3995
3996
3997 # name: <cell-element>
3998 # type: sq_string
3999 # elements: 1
4000 # length: 32
4001 Performs quadtree decomposition.
4002
4003
4004
4005 # name: <cell-element>
4006 # type: sq_string
4007 # elements: 1
4008 # length: 8
4009 qtgetblk
4010
4011
4012 # name: <cell-element>
4013 # type: sq_string
4014 # elements: 1
4015 # length: 904
4016  -- Function File: [VALS] =  qtgetblk (I,S,DIM)
4017  -- Function File: [VALS,IDX] =  qtgetblk (I,S,DIM)
4018  -- Function File: [VALS,R,C] =  qtgetblk (I,S,DIM)
4019      Obtain block values from a quadtree decomposition.
4020
4021      [vals]=qtgetblk(I,S,dim) returns a dim-by-dim-by-k array in VALS
4022      which contains the dim-by-dim blocks in the quadtree decomposition
4023      (S, which is returned by qtdecomp) of I. If there are no blocks,
4024      an empty matrix is returned.
4025
4026      [vals,idx]=qtgetblk(I,S,dim) returns VALS as described above.  In
4027      addition, it returns IDX, a vector which contains the linear
4028      indices of the upper left corner of each block returned (the same
4029      result as find(full(S)==dim)).
4030
4031      [vals,r,c]=qtgetblk(I,S,dim) returns VALS as described, and two
4032      vectors, R and C, which contain the row and column coordinates of
4033      the blocks returned.
4034
4035      See also: qtdecomp, qtsetblk
4036
4037
4038
4039
4040
4041 # name: <cell-element>
4042 # type: sq_string
4043 # elements: 1
4044 # length: 50
4045 Obtain block values from a quadtree decomposition.
4046
4047
4048
4049 # name: <cell-element>
4050 # type: sq_string
4051 # elements: 1
4052 # length: 8
4053 qtsetblk
4054
4055
4056 # name: <cell-element>
4057 # type: sq_string
4058 # elements: 1
4059 # length: 412
4060  -- Function File: J =  qtsetblk (I,S,DIM,VALS)
4061      Set block values in a quadtree decomposition.
4062
4063      J=qtsetblk(I,S,dim,vals) sets all the DIM-by-DIM blocks in the
4064      quadtree decomposition (S returned by qtdecomp) of I to DIM-by-DIM
4065      blocks in VALS, which is itself a DIM-by-DIM-by-k array. k is the
4066      number of DIM-by-DIM blocks in the quadtree decomposition.
4067
4068      See also: qtdecomp, qtgetblk
4069
4070
4071
4072
4073
4074 # name: <cell-element>
4075 # type: sq_string
4076 # elements: 1
4077 # length: 45
4078 Set block values in a quadtree decomposition.
4079
4080
4081
4082 # name: <cell-element>
4083 # type: sq_string
4084 # elements: 1
4085 # length: 5
4086 radon
4087
4088
4089 # name: <cell-element>
4090 # type: sq_string
4091 # elements: 1
4092 # length: 346
4093  -- Function File: [RT,XP] = radon(I, THETA)
4094  -- Function File: [RT,XP] = radon(I)
4095      Calculates the 2D-Radon transform of the matrix I at angles given
4096      in THETA. To each element of THETA corresponds a column in RT.
4097      The variable XP represents the x-axis of the rotated coordinate.
4098      If THETA is not defined, then 0:179 is assumed.
4099
4100
4101
4102
4103 # name: <cell-element>
4104 # type: sq_string
4105 # elements: 1
4106 # length: 75
4107 Calculates the 2D-Radon transform of the matrix I at angles given in
4108 THETA.
4109
4110
4111
4112 # name: <cell-element>
4113 # type: sq_string
4114 # elements: 1
4115 # length: 9
4116 rangefilt
4117
4118
4119 # name: <cell-element>
4120 # type: sq_string
4121 # elements: 1
4122 # length: 865
4123  -- Function File: R = rangefilt (IM)
4124  -- Function File: R = rangefilt (IM, DOMAIN)
4125  -- Function File: R = rangefilt (IM, DOMAIN, PADDING, ...)
4126      Computes the local intensity range in a neighbourhood around each
4127      pixel in an image.
4128
4129      The intensity range of the pixels of a neighbourhood is computed as
4130
4131           R = max (X) - min (X)
4132
4133      where X is the value of the pixels in the neighbourhood,
4134
4135      The neighbourhood is defined by the DOMAIN binary mask. Elements
4136      of the mask with a non-zero value are considered part of the
4137      neighbourhood. By default a 3 by 3 matrix containing only non-zero
4138      values is used.
4139
4140      At the border of the image, extrapolation is used. By default
4141      symmetric extrapolation is used, but any method supported by the
4142      `padarray' function can be used.
4143
4144      See also: paddarray, entropyfilt, stdfilt
4145
4146
4147
4148
4149
4150 # name: <cell-element>
4151 # type: sq_string
4152 # elements: 1
4153 # length: 80
4154 Computes the local intensity range in a neighbourhood around each pixel
4155 in an im
4156
4157
4158
4159 # name: <cell-element>
4160 # type: sq_string
4161 # elements: 1
4162 # length: 8
4163 readexif
4164
4165
4166 # name: <cell-element>
4167 # type: sq_string
4168 # elements: 1
4169 # length: 672
4170  -- Function File: EXIF = readexif(FILENAME, THUMBNAIL)
4171      Read EXIF information from JPEG image data.
4172
4173      The exif tag information are returned in the EXIF data structure.
4174      Integer ratios are expressed as column vector.  For example, a
4175      focal number of 2.8 is expressed as FNumber=[28; 10]. Otherwise
4176      all data are returned by the type as specified in the IFD
4177      structures.
4178
4179      The filename for the thumbnail image is optional.  If given, the
4180      thumbnail jpeg image will be stored to file THUMBNAIL.
4181
4182      Reference: JEITA CP-3451, Exchangeable image file format for
4183      digital still cameras: Exif Version 2.2
4184
4185      See also: imwrite, imfinfo
4186
4187
4188
4189
4190
4191 # name: <cell-element>
4192 # type: sq_string
4193 # elements: 1
4194 # length: 43
4195 Read EXIF information from JPEG image data.
4196
4197
4198
4199 # name: <cell-element>
4200 # type: sq_string
4201 # elements: 1
4202 # length: 11
4203 regionprops
4204
4205
4206 # name: <cell-element>
4207 # type: sq_string
4208 # elements: 1
4209 # length: 2719
4210  -- Function File: PROPS =  regionprops (BW)
4211  -- Function File: PROPS =  regionprops (BW, PROPERTIES, ...)
4212      Compute object properties in a binary image.
4213
4214      `regionprops' computes various properties of the individual
4215      objects (as identified by `bwlabel') in the binary image BW. The
4216      result is a structure array containing an entry per property per
4217      object.
4218
4219      The following properties can be computed.
4220
4221     "Area"
4222           The number of pixels in the object.
4223
4224     "EulerNumber"
4225     "euler_number"
4226           The Euler number of the object (see `bweuler' for details).
4227
4228     "BoundingBox"
4229     "bounding_box"
4230           The bounding box of the object. This is represented as a
4231           4-vector where the first two entries are the x and y
4232           coordinates of the upper left corner of the bounding box, and
4233           the two last entries are the width and the height of the box.
4234
4235     "Extent"
4236           The area of the object divided by the area of the bounding
4237           box.
4238
4239     "Perimeter"
4240           The length of the boundary of the object.
4241
4242     "Centroid"
4243           The center coordinate of the object.
4244
4245     "PixelIdxList"
4246     "pixel_idx_list"
4247           The indices of the pixels in the object.
4248
4249     "FilledArea"
4250     "filled_area"
4251           The area of the object including possible holes.
4252
4253     "PixelList"
4254     "pixel_list"
4255           The actual pixel values inside the object. This is only
4256           useful for grey scale images.
4257
4258     "FilledImage"
4259     "filled_image"
4260           A binary image with the same size as the object's bounding
4261           box that contains the object with all holes removed.
4262
4263     "Image"
4264           An image with the same size as the bounding box that contains
4265           the original pixels.
4266
4267     "MaxIntensity"
4268     "max_intensity"
4269           The maximum intensity inside the object.
4270
4271     "MinIntensity"
4272     "min_intensity"
4273           The minimum intensity inside the object.
4274
4275     "WeightedCentroid"
4276     "weighted_centroid"
4277           The centroid of the object where pixel values are used as
4278           weights.
4279
4280     "MeanIntensity"
4281     "mean_intensity"
4282           The mean intensity inside the object.
4283
4284     "PixelValues"
4285     "pixel_values"
4286           The pixel values inside the object represented as a vector.
4287
4288      The requested properties can either be specified as several input
4289      arguments or as a cell array of strings. As a short-hand it is
4290      also possible to give the following strings as arguments.
4291
4292     "basic"
4293           The following properties are computed: "Area", "Centroid" and
4294           "BoundingBox".
4295
4296     "all"
4297           All properties are computed.
4298
4299      If no properties are given, basic is assumed.
4300
4301      See also: bwlabel, bwperim, bweuler
4302
4303
4304
4305
4306
4307 # name: <cell-element>
4308 # type: sq_string
4309 # elements: 1
4310 # length: 44
4311 Compute object properties in a binary image.
4312
4313
4314
4315 # name: <cell-element>
4316 # type: sq_string
4317 # elements: 1
4318 # length: 8
4319 rgb2gray
4320
4321
4322 # name: <cell-element>
4323 # type: sq_string
4324 # elements: 1
4325 # length: 415
4326  -- Function File: GRAY = rgb2gray (RGB)
4327      Converts an RGB image to a gray scale image, or a color map to a
4328      gray map.
4329
4330      If the input is an RGB image, the conversion to a gray image is
4331      computed as the mean value of the color channels.
4332
4333      If the input is a color map it is converted into the YIQ space of
4334      ntsc. The luminance value (Y) is taken to create a gray color map.
4335      R = G = B = Y
4336
4337
4338
4339
4340 # name: <cell-element>
4341 # type: sq_string
4342 # elements: 1
4343 # length: 74
4344 Converts an RGB image to a gray scale image, or a color map to a gray
4345 map.
4346
4347
4348
4349 # name: <cell-element>
4350 # type: sq_string
4351 # elements: 1
4352 # length: 9
4353 rgb2ycbcr
4354
4355
4356 # name: <cell-element>
4357 # type: sq_string
4358 # elements: 1
4359 # length: 398
4360  -- Function File: B = rgb2ycbcr(A)
4361      Perform colour convertion from RGB to YCbCr on a given image.
4362
4363      The image A must be a NxMx3 image. The conversion The convertion
4364      changes the image from the RGB color model to YCbCr e.g.
4365           imOut = rgb2ycbcr(imIn);
4366      Currently this function only works with `uint8' and will always
4367      return an `uint8' matrix.
4368
4369      See also: cmunique
4370
4371
4372
4373
4374
4375 # name: <cell-element>
4376 # type: sq_string
4377 # elements: 1
4378 # length: 61
4379 Perform colour convertion from RGB to YCbCr on a given image.
4380
4381
4382
4383 # name: <cell-element>
4384 # type: sq_string
4385 # elements: 1
4386 # length: 7
4387 rgbplot
4388
4389
4390 # name: <cell-element>
4391 # type: sq_string
4392 # elements: 1
4393 # length: 316
4394  -- Function File: rgbplot (MAP)
4395  -- Function File: H = rgbplot (MAP)
4396      Plot a given color map.  The matrix MAP must be a M by 3 matrix.
4397      The three columns of the colormap matrix are plotted in red,
4398      green, and blue lines.
4399
4400      If an output is requested, a graphics handle to the plot is
4401      returned.
4402
4403
4404
4405
4406 # name: <cell-element>
4407 # type: sq_string
4408 # elements: 1
4409 # length: 23
4410 Plot a given color map.
4411
4412
4413
4414 # name: <cell-element>
4415 # type: sq_string
4416 # elements: 1
4417 # length: 10
4418 rho_filter
4419
4420
4421 # name: <cell-element>
4422 # type: sq_string
4423 # elements: 1
4424 # length: 2383
4425  -- Function: FILTERED = rho_filter (PROJ, TYPE, SCALING)
4426      Filters the parallel ray projections in the columns of PROJ,
4427      according to the filter type chosen by TYPE.  TYPE can be chosen
4428      from
4429         * 'none'
4430
4431         * 'Ram-Lak' (default)
4432
4433         * 'Shepp-Logan'
4434
4435         * 'Cosine'
4436
4437         * 'Hann'
4438
4439         * 'Hamming'
4440
4441      If given, SCALING determines the proportion of frequencies below
4442      the nyquist frequency that should be passed by the filter.  The
4443      window function is compressed accordingly, to avoid an abrupt
4444      truncation of the frequency response.
4445
4446  -- Function: [FILTERED, FILTER] = rho_filter (...)
4447      This form also returns the frequency response of the filter in the
4448      vector FILTER.
4449
4450
4451    Performs rho filtering on the parallel ray projections provided.
4452
4453    Rho filtering is performed as part of the filtered back-projection
4454 method of CT image reconstruction.  It is the filtered part of the name.
4455 The simplest rho filter is the Ramachadran-Lakshminarayanan (Ram-Lak),
4456 which is simply |rho|, where rho is the radial component of spatial
4457 frequency.  However, this can cause unwanted amplification of noise,
4458 which is what the other types attempt to minimise, by introducing
4459 roll-off into the response.  The Hann and Hamming filters multiply the
4460 standard response by a Hann or Hamming window, respectively.  The
4461 cosine filter is the standard response multiplied by a cosine shape,
4462 and the Shepp-Logan filter multiplies the response with a sinc shape.
4463 The 'none' filter performs no filtering, and is included for
4464 completeness and to enable incorporating this function easily into
4465 scripts or functions that may offer the ability to choose to apply no
4466 filtering.
4467
4468    This function is designed to be used by the function `iradon', but
4469 has been exposed to facilitate custom inverse radon transforms and to
4470 more clearly break down the process for educational purposes.  The
4471 operations
4472          filtered = rho_filter (proj);
4473          reconstruction = iradon (filtered, 1, 'linear', 'none');
4474    are exactly equivalent to
4475          reconstruction = iradon (proj, 1, 'linear', 'Ram-Lak');
4476
4477    Usage example:
4478        P = phantom ();
4479        projections = radon (P);
4480        filtered_projections = rho_filter (projections, 'Hamming');
4481        reconstruction = iradon (filtered_projections, 1, 'linear', 'none');
4482        figure, imshow (reconstruction, [])
4483
4484
4485
4486
4487 # name: <cell-element>
4488 # type: sq_string
4489 # elements: 1
4490 # length: 80
4491 Filters the parallel ray projections in the columns of PROJ, according
4492 to the fi
4493
4494
4495
4496 # name: <cell-element>
4497 # type: sq_string
4498 # elements: 1
4499 # length: 8
4500 roicolor
4501
4502
4503 # name: <cell-element>
4504 # type: sq_string
4505 # elements: 1
4506 # length: 551
4507  -- Function File: BW =  roicolor (A,LOW,HIGH)
4508  -- Function File: BW =  roicolor (A,V)
4509      Select a Region Of Interest of an image based on color.
4510
4511      BW = roicolor(A,low,high) selects a region of interest (ROI) of an
4512      image A returning a black and white image in a logical array (1 for
4513      pixels inside ROI and 0 outside ROI), which is formed by all pixels
4514      whose values lie within the colormap range specified by [LOW HIGH].
4515
4516      BW = roicolor(A,v) selects a region of interest (ROI) formed by all
4517      pixels that match values in V.
4518
4519
4520
4521
4522 # name: <cell-element>
4523 # type: sq_string
4524 # elements: 1
4525 # length: 55
4526 Select a Region Of Interest of an image based on color.
4527
4528
4529
4530 # name: <cell-element>
4531 # type: sq_string
4532 # elements: 1
4533 # length: 4
4534 std2
4535
4536
4537 # name: <cell-element>
4538 # type: sq_string
4539 # elements: 1
4540 # length: 148
4541  -- Function File: S = std2 (I)
4542      Returns the standard deviation for a 2d real type matrix.  Uses
4543      `std (I(:))'
4544
4545      See also: mean2, std
4546
4547
4548
4549
4550
4551 # name: <cell-element>
4552 # type: sq_string
4553 # elements: 1
4554 # length: 57
4555 Returns the standard deviation for a 2d real type matrix.
4556
4557
4558
4559 # name: <cell-element>
4560 # type: sq_string
4561 # elements: 1
4562 # length: 7
4563 stdfilt
4564
4565
4566 # name: <cell-element>
4567 # type: sq_string
4568 # elements: 1
4569 # length: 1069
4570  -- Function File: S = stdfilt (IM)
4571  -- Function File: S = stdfilt (IM, DOMAIN)
4572  -- Function File: S = stdfilt (IM, DOMAIN, PADDING, ...)
4573      Computes the local standard deviation in a neighbourhood around
4574      each pixel in an image.
4575
4576      The standard deviation of the pixels of a neighbourhood is
4577      computed as
4578
4579           S = sqrt ((sum (X - MU).^2)/(N-1))
4580
4581      where MU is the mean value of the pixels in the neighbourhood, N
4582      is the number of pixels in the neighbourhood. So, an unbiased
4583      estimator is used.
4584
4585      The neighbourhood is defined by the DOMAIN binary mask. Elements
4586      of the mask with a non-zero value are considered part of the
4587      neighbourhood. By default a 3 by 3 matrix containing only non-zero
4588      values is used.
4589
4590      At the border of the image, extrapolation is used. By default
4591      symmetric extrapolation is used, but any method supported by the
4592      `padarray' function can be used. Since extrapolation is used, one
4593      can expect a lower deviation near the image border.
4594
4595      See also: std2, paddarray, entropyfilt
4596
4597
4598
4599
4600
4601 # name: <cell-element>
4602 # type: sq_string
4603 # elements: 1
4604 # length: 80
4605 Computes the local standard deviation in a neighbourhood around each
4606 pixel in an
4607
4608
4609
4610 # name: <cell-element>
4611 # type: sq_string
4612 # elements: 1
4613 # length: 10
4614 stretchlim
4615
4616
4617 # name: <cell-element>
4618 # type: sq_string
4619 # elements: 1
4620 # length: 1940
4621  -- Function File: LOW_HIGH =  stretchlim (I,TOL)
4622  -- Function File: LOW_HIGH =  stretchlim (I)
4623  -- Function File: LOW_HIGH =  stretchlim (RGB,TOL)
4624  -- Function File: LOW_HIGH =  stretchlim (RGB)
4625      Finds limits to contrast stretch an image
4626
4627      `LOW_HIGH=stretchlim(I,TOL)' returns a vector LOW_HIGH which
4628      contains a pair of intensities which can be used in `imadjust' to
4629      stretch the contrast of an image, first of them will be lower
4630      value (`imadjust' would assign 0 to it) and second is the upper
4631      bound. TOL specifies the fraction of the image to saturate at
4632      lower and upper limits. It can be a vector of length 2:
4633      `[LOW_FRACT, HIGH_FRACT]', or it can be a scalar, in that case
4634      `[LOW_FRACT, HIGH_FRACT]=[TOL, 1-TOL]'.
4635
4636      TOL can't be larger than 0.50 and for TOL=0 then
4637      `LOW_HIGH=[min(I(:)), max(I(:))]'.
4638
4639      `LOW_HIGH=stretchlim(I)' behaves as described but defaults TOL to
4640      `[0.01, 0.99]'.
4641
4642      `LOW_HIGH=stretchlim(RGB,TOL)' returns a 2-by-3 matrix in LOW_HIGH
4643      of lower and upper values to saturate for each plane of the RGB
4644      image in M-by-N-by-3 array RGB. TOL is a vector or a scalar, as
4645      described above, and the same fractions are applied for each plane.
4646
4647      `LOW_HIGH=stretchlim(RGB)' uses `[0.01, 0.99]' as default value
4648      for TOL.
4649
4650      *Notes:*
4651
4652      Values in LOW_HIGH are of type double and comprised between 0 and
4653      1 regardless class of input image.
4654
4655      *Compatibility notes:*
4656
4657         * int* and uint* types are still not implemented (waiting for
4658           support in Octave 2.1.58).
4659
4660         * This function tries to find limits that are nearer to saturate
4661           requested interval. So, for instance, if you requested a 5%
4662           and it has to choose between discarding a 1% and a 7%, it
4663           will choose the later despite being more than requested. This
4664           should be test against MATLAB behaviour.
4665
4666      See also: imadjust
4667
4668
4669
4670
4671
4672 # name: <cell-element>
4673 # type: sq_string
4674 # elements: 1
4675 # length: 42
4676 Finds limits to contrast stretch an image
4677
4678
4679
4680
4681 # name: <cell-element>
4682 # type: sq_string
4683 # elements: 1
4684 # length: 13
4685 tiff_tag_read
4686
4687
4688 # name: <cell-element>
4689 # type: sq_string
4690 # elements: 1
4691 # length: 441
4692  -- Function File: [ VALUE, OFFSET] = tiff_tag_read (FILE, TAG, IFD)
4693      Reads the values of TIFF file tags.
4694
4695      FILE is a TIFF file and TAG is the tag number to read. If IFD is
4696      given, only the tag value from that IFD (Image File Directory)
4697      will be read. By default, reads only the first IFD.
4698
4699      VALUE is the read value from TAG. OFFSET will be `1' if VALUE is a
4700      file offset.
4701
4702      See also: imread, imfinfo, readexif
4703
4704
4705
4706
4707
4708 # name: <cell-element>
4709 # type: sq_string
4710 # elements: 1
4711 # length: 35
4712 Reads the values of TIFF file tags.
4713
4714
4715
4716 # name: <cell-element>
4717 # type: sq_string
4718 # elements: 1
4719 # length: 7
4720 uintlut
4721
4722
4723 # name: <cell-element>
4724 # type: sq_string
4725 # elements: 1
4726 # length: 250
4727  -- Function File: B =  uintlut (A,LUT)
4728      Computes matrix B by using A as an index to lookup table LUT.
4729
4730      B = uintlut(A, LUT) calculates a matrix B by using LUT as a lookup
4731      table indexed by values in A.
4732
4733      B class is the same as LUT.
4734
4735
4736
4737
4738 # name: <cell-element>
4739 # type: sq_string
4740 # elements: 1
4741 # length: 61
4742 Computes matrix B by using A as an index to lookup table LUT.
4743
4744
4745
4746
4747