-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathindex.html
executable file
·1955 lines (1466 loc) · 69.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Peter's Functions for Computer Vision</title>
<meta NAME="keywords" CONTENT="MATLAB,image processing,computer vision,phase congruency,edge detection,image enhancement, ransac">
<meta NAME="description" CONTENT="MATLAB Functions for Computer Vision and Image Analysis. Functions include: Feature detection from Phase Congruency, Edge linking and segment fitting, Projective geometry, Image enhancement, and many others">
<meta http-equiv="refresh">
<meta http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">
<link href="pkstylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<h1>MATLAB and Octave Functions <br>
for Computer Vision and Image Processing</h1>
</center>
<hr>
<table>
<tr>
<td width ="50%">
<h2><a href="http://www.peterkovesi.com">Peter Kovesi</a></h2>
<td width="50%">
<!--
<br>
<table border="3", cellpadding="20"> <tr><td>
<a href="http://dicta2012.csse.uwa.edu.au">
<font size="+4" weight="bold" color="#0000a0"><b> DICTA 2012</b></font></a>
<br>
<font size="+0" weight="bold"><b>
Digital Image Computing: Techniques and Applications<br><br>
Fremantle, Western Australia<br> 3-5th December 2012</b></font>
-->
</td></tr></table>
</td>
</table>
<br>
<hr>
<table cellpadding="20", bordercolor="000000" rules="cols" frame="void">
<tr><td width="50%">
<h3>Index to Code Sections</h3>
<ul>
<li>
<img src="new.gif">
<a href="#colour">Perceptually Uniform Colour Maps</a>
<li><a href="#phasecong">Feature Detection via Phase Congruency</a>
<li><a href="#spatial">Spatial Feature Detection</a>
<li><a href="#segmentation">Segmentation</a>
<li><a href="#integral">Integral Images</a>
<li><a href="#hysthresh">Non-Maxima Suppression and Hysteresis Thresholding</a>
<li><a href="#edgelink">Edge Linking and Line Segment Fitting</a>
<li><a href="#step2line">Test Grating for Edge Detection</a>
<li><a href="#noisecomp">Image Denoising</a>
<li><a href="#shapelet">Surface Normals to Surfaces</a>
<li><a href="#scalogram">Scalogram Calculation</a>
<li><a href="#anisodiff">Anisotropic diffusion</a>
<li><a href="#greytrans">Grey Scale Transformation and Enhancement</a>
<li><a href="#freqfilt">Frequency Domain Transformations</a>
<li><a href="#projective">Functions Supporting Projective Geometry</a>
<li><a href="#match">Feature Matching</a>
<li><a href="#robust">Model Fitting and Robust Estimation</a>
<li><a href="#fingerprints">Fingerprint Enhancement</a>
<li><a href="#syntheticimages">Interesting Synthetic Images</a>
<li><a href="#asciiimage">ASCII Image Generation</a>
<li><a href="#rotationtransforms">Rotation Transforms</a>
<li><a href="#geosci">Geoscientific Functions</a>
<li>
<img src="new.gif">
<a href="#blending">Interactive Image Blending</a>
<li><a href="#display">Image Display, Image Writing and Miscellaneous</a>
</ul>
<hr>
The complete set of these functions is available as a zip file
<a href="../MatlabFns.zip">MatlabFns.zip</a>
<ul>
<li><a href=citesite.html>How to cite this site</a>
<li><a href=license.html>MIT License</a>
<li>Can't find what you want here? Have a look at<br>
<a href=othersites.html>Other highly recommended Computer Vision software sites</a>
</ul>
<h3>MATLAB</h3>
<p>To use these functions you will need
<a href="http://www.mathworks.com/products/matlab/">MATLAB</a> and the
<a href="http://www.mathworks.com.au/products/image/">MATLAB Image Processing Toolbox</a>.<br>
You may also want to refer to the <a href="http://www.mathworks.com.au/help/techdoc/">MATLAB documentation</a> and the
<a href="http://www.mathworks.com/help/images/index.html">Image Processing Toolbox documentation</a><br>
</td>
<td valign="top" width="50%">
<h3>Octave</h3>
<p>Alternatively you can
use <a href="http://www.gnu.org/software/octave/">Octave</a> which is
a very good open source alternative to MATLAB. Almost all the functions
on this page run under Octave. See my <a href=octaveinfo.html>Notes on using Octave</a>.
<p>An advantage of using Octave is that you can run it on your Android
device. (I can compute phase congruency on my mobile phone!) Get
Corbin Champion's port of Octave at Google play
<a href="https://play.google.com/store/apps/details?id=com.octave&hl=en">here</a>.
<p>MATLAB/Octave compatibility of individual function is indicated as follows
<ul>
<li type=square> Runs under MATLAB and Octave.
<li type=circle> Only runs under MATLAB.
<li type=disc> Not tested under Octave (yet).
</ul>
<br>
<h3><a href="http://julialang.org">
<img style="vertical-align:middle"
src="https://lh5.googleusercontent.com/-Iqwvvbp-o6U/VHKv98UHkDI/AAAAAAAAJVU/RqwYqjkyADI/s1600/julia.png"
width="50"></a></h3>
<p>These days I am increasingly working
in <a href="http://julialang.org">Julia</a>. This is a very exciting
language that is certainly worth a look. At this stage the language
is still young and the image processing and computer vision packages
are very much a work in progress. However, watch this space! Julia may
well become the dominant language for scientific programming.
<p> Collections of functions that I have ported to Julia are indicated
in the code sections below.
<br>
<br>
<br>
<br>
<hr>
<p>I receive so many mail messages regarding this site that I have
difficulty responding to them all. I will endeavor to respond to mail
that directly concerns the use of individual functions. However,
please note I do not have the time to provide an on-line vision
problem solving service!
<p>Please report any bugs and/or suggest enhancements to<br>
<p>Cheers,<br>
Peter Kovesi
</td>
</tr>
</table>
<a name="colour"></a>
<hr>
<h4><img src="new.gif">
Perceptually Uniform Colour Maps</h4>
<center>
<img src=WWWImages/colourmapmontage.jpg>
</center>
<p> Many widely used colour maps have perceptual flat spots that can
hide features as large as 10% of your total data range. MATLAB's
'hot' and 'hsv' colour maps suffer from this problem. Use these
colour maps instead. For an overview of this work and the theory
behind it please visit
<a href="http://peterkovesi.com/projects/colourmaps/index.html">this page</a>
<p><b>Generation and correction of colour maps</b>
<ul>
<li><a href="Colourmaps/cmap.m">cmap.m</a> Colour map generating
function. Select from a large library of colour maps. Colour maps are
defined by B-spline paths through CIELAB space. The parameterisation
along the path is then adjusted to ensure uniform perceptual contrast.
Modify the function to add any new colour maps you want.
<li><a href="Colourmaps/equalisecolourmap.m">equalisecolourmap.m</a>
Remaps entries in a colour map in order to equalise the perceptual
contrast across the colour map. Used by cmap.m . Can also be used to
'rescue' some of MATLAB's colour maps.
<li><a href="Colourmaps/linearrgbmap.m">linearrgbmap.m</a> Generates
a linear colour map from [0 0 0] to a specified colour in RGB space.
<li><a href="Colourmaps/ternarymaps.m">ternarymaps.m</a> Returns three
basis/primary colour maps for generating ternary images. The colour
maps are closely matched in lightness (unlike the RGB primaries).
<li><a href="Misc/randmap.m">randmap.m</a> Generates a colour map of
random colours. Not perceptually uniform and certainly not useful for
displaying data that varies over a continous range. However, it is
useful for displaying a labeled segmented image.
</ul>
<p><b>Rendering of images with colour maps</b>
<ul>
<li><a href="Misc/applycolourmap.m">applycolourmap.m</a> Applies a
colour map to a single channel image to obtain an RGB result.
<li><a href="Misc/showdivim.m">showdivim.m</a> This function is
intended for displaying an image with a diverging colour map. To do
this correctly requires that the desired reference value in the data
is correctly associated with the centre entry of the diverging colour
map.
<li><a href="Misc/showangularim.m">showangularim.m</a> This function
displays an image of angular data with a specified colour map. For
angular data to be rendered correctly it is important that the data
values are respected so that data values are correctly assigned to
specific entries in a cyclic colour map. The assignment of values to
colours also depends on whether the data is cyclic over pi, or 2*pi.
This function also allows the colour map encoding of the angular
information to be modulated to represent the
amplitude/reliability/coherence of the angular data.
<li><a href="Colourmaps/ternaryimage.m">ternaryimage.m</a> Generates a
perceptually uniform ternary image from 3 bands of data using the
colour maps generated by
<a href="Colourmaps/ternarymaps.m">ternarymaps.m</a>
</ul>
<p><b>Test images</b>
<ul>
<li><a href="Misc/sineramp.m">sineramp.m</a> Generates a test image
consisting of a sine wave superimposed on a ramp function The
amplitude of the sine wave is modulated from its full value at the top
of the image to 0 at the bottom. A useful test image for evaluating
colour maps.
<li> <a href="Misc/circlesineramp.m">circlesineramp.m</a> Generates a
test image representing a cyclic version of sineramp.m for testing of
cyclic colour maps. It consists of a sine wave superimposed on a
spiral ramp function.
</ul>
<p><b>Visualization of colour map paths and colour spaces</b>
<ul>
<li><a href="Colourmaps/colourmappath.m">colourmappath.m</a> Plots the
path of a colour map through CIELAB or RGB colour spaces.
<li><a href="Misc/viewlabspace.m">viewlabspace.m</a> Interactive
visualization of CIELAB colour space. Useful for charting locations
of spline control points for defining colour maps with cmap.m
<li><a href="Misc/viewlabspace2.m">viewlabspace2.m</a> Another
interactive visualization of CIELAB colour space that provides
vertical slices through the colour space.
<li><a href="Colourmaps/generatelabslice.m">generatelabslice.m</a>
Generates an RGB image of a slice throught CIELAB space at a
specified lightness level.
</ul>
<p><b>Functions for reading and writing colour maps in various formats</b>
<ul>
<li><a href="Colourmaps/writecolourmapfn.m">writecolourmapfn.m</a>
Creates a MATLAB function file from a Nx3 colour map.
<li><a href="Colourmaps/map2geosofttbl.m">map2geosofttbl.m</a> Writes
a RGB colour map to a .tbl file for use with Geosoft Oasis Montaj
or QGIS.
<li><a href="Colourmaps/map2ermapperlutfile.m">map2ermapperlutfile.m</a>
Writes a colour map to a .lut file for use with ER Mapper, Intrepid or
MapInfo.
<li><a href="Colourmaps/readermapperlutfile.m">readermapperlutfile.m</a>
Reads a colour map in ER Mapper's LUT format.
<li><a href="Colourmaps/map2imagejlutfile.m">map2imagejlutfile.m</a> Writes a
colour map to a .lut file for use with ImageJ.
<li><a href="Colourmaps/readimagejlutfile.m">readimagejlutfile.m</a>
Reads a colour map in ImageJ's LUT format.
<li><a href="Colourmaps/map2actfile.m">map2actfile.m</a> Writes a
colour map to an Adobe Colour Map Table .act file.
<li><a href="Colourmaps/map2qgisstyle.m">map2qgisstyle.m</a> Writes
colour maps to a QGIS xml style file.
</ul>
<p><b>Colour conversion convenience functions.</b>
<ul>
<li><a href=Misc/rgb2lab.m>rgb2lab.m</a> RGB to L*a*b* colour conversion.
<li><a href=Misc/rgb2cmyk.m>rgb2cmyk.m</a> RGB to cmyk colour conversion.
<li><a href=Misc/cmyk2rgb.m>cmyk2rgb.m</a> cmyk to RGB colour conversion.
<li type=square><a href=Misc/rgb2nrgb.m>rgb2nrgb.m</a> RGB to
normalised RGB colour conversion.
</ul>
<p><b>Additional supporting functions that are required.</b>
<ul>
<li><a href="Misc/bbspline.m">bbspline.m</a> Basic b-spline
implementation used to generate paths through colour space for
cmap.m
<li><a href="Misc/pbspline.m">pbspline.m</a> Basic periodic b-spline
implementation used to generate paths through colour space for
cmap.m
<li>Also needed: <a href="Misc/show.m">show.m</a>,
<a href="GreyTrans/normalise.m">normalise.m</a> and
<a href="Misc/strendswith.m">strendswith.m</a>
</ul>
<p><b>Julia Code</b>
<p>
<a href="http://julialang.org">
<img style="vertical-align:middle"
src="https://lh5.googleusercontent.com/-Iqwvvbp-o6U/VHKv98UHkDI/AAAAAAAAJVU/RqwYqjkyADI/s1600/julia.png" width="50"></a>
For those working in <a href="http://julialang.org"> Julia</a> I have
produced a package containing most of the functions above:
<a href="https://github.com/peterkovesi/PerceptualColourMaps.jl">PerceptualColourMaps.jl</a>
<p><b>Reference:</b>
<ul>
<li>
Peter Kovesi. "Good Colour Maps: How to Design Them."<br>
<a href="http://arxiv.org/abs/1509.03700">arXiv:1509.03700 [cs.GR] 2015.</a>
<a name="blending"></a>
<hr>
<h4><img src="new.gif">
Interactive Image Blending</h4>
<center><img align=top src=WWWImages/threemix5.png></center>
<p>These functions provide a set of interactive tools for visualizing
multiple images. Some videos of their use can be seen
<a href="http://peterkovesi.com/projects/imageblending/index.html"> here</a>.
<ul>
<li><a href=Blender/linimix.m>linimix.m</a>
Generates an interactive image for blending between a sequence of images.
<li><a href=Blender/bilinimix.m>bilinimix.m</a>
Generates an interactive image for blending between a 2D grid of images.
<li><a href=Blender/ternarymix.m>ternarymix.m</a> Interactive ternary
image for blending 3 images. You can also switch between blending and
swiping modes.<br> Updated December 2014 to incorporate swiping in
addition to blending. Can also switch between colour and greyscale
modes.
<li><a href=Blender/binarymix.m>binarymix.m</a>
Just like ternarymix but for 2 images.
<li><a href=Blender/cliquemix.m>cliquemix.m</a> Allows
blending or swiping between any pair within a collection of images.
<br>Updated December 2014 to incorporate swiping in addition to blending.
<li><a href=Blender/cyclemix.m>cyclemix.m</a> Allows
blending between a sequence of images in a cyclic manner.
<li><a href=Blender/logisticweighting.m>logisticweighting.m</a>
Adaptation of the generalised logistics function for use as a
weighting function for blending images.
<li><a href=Blender/swipe.m>swipe.m</a> Don't just swipe between two
images when you can interactively swipe between 2, 3 or 4 images!
<li><a href=Blender/collectncheckimages.m>collectncheckimages.m</a>
Collects and checks images prior to blending.
</ul>
<p>The functions above also require:
<a href=GreyTrans/normalise.m>normalise.m</a>,
<a href=GreyTrans/histtruncate.m>histtruncate.m</a>,
<a href=Misc/circle.m>circle.m</a>,
<a href=Misc/circularstruct.m>circularstruct.m</a> and
<a href=Misc/namenpath.m>namenpath.m</a>.
<p><b>Demo package:</b> Download
<a href=BlendDemo/BlendDemo.zip>BlendDemo.zip</a>. This contains all
the functions above and some sample data sets. Within the expanded
folder in MATLAB run <tt>blenddemo.m</tt>. A series of windows will
open, each demonstrating a different blending interface. Click in any
of them and play!
<p><b>Reference:</b>
<ul>
<li>
Peter Kovesi, Eun-Jung Holden and Jason Wong, 2014. "Interactive
Multi-Image Blending for Visualization and
Interpretation," <i>Computers & Geosciences</i> 72 (2014) 147-155.
<a href="http://doi.org/10.1016/j.cageo.2014.07.010">http://doi.org/10.1016/j.cageo.2014.07.010</a>
</ul>
<a name="phasecong"></a>
<hr>
<h4>Phase Based Feature Detection and Phase Congruency</h4>
<center><img align=top src=WWWImages/baboon.pc.gif> </center><br>
<ul>
<p> Phase congruency is an illumination and contrast invariant measure
of feature significance. Unlike gradient based feature detectors,
which can only detect step features, phase congruency correctly
detects features at <i>all</i> kind of phase angle, and not just step
features having a phase angle of 0 or 180 degrees.
<li type=square>
<a href=PhaseCongruency/phasecongmono.m>phasecongmono.m</a> This
function computes phase congruency via monogenic filters. It has
excellent speed and much reduced memory requirements compared to the
other phase congruency functions below. Requires
<a href=FrequencyFilt/filtergrid.m>filtergrid.m</a> and
<a href=FrequencyFilt/lowpassfilter.m>lowpassfilter.m</a>
<li type=square>
<a href=PhaseCongruency/phasecong3.m>phasecong3.m</a> This function
supersedes phasecong2.m and phasecong.m being faster and requiring less
memory. Computes corner features in addition to edges. Requires
<a href=FrequencyFilt/filtergrid.m>filtergrid.m</a> and
<a href=FrequencyFilt/lowpassfilter.m>lowpassfilter.m</a>
<p><ul>
<li type=square> Deprecated: <a href=PhaseCongruency/phasecong.m>phasecong.m</a>
Original code for calculating phase congruency in an image. This function also
returns a feature type image. Note this function is superseded by
phasecong2.m and phasecong3.m and is only here for reference.
<li type=square> Deprecated:
<a href=PhaseCongruency/phasecong2.m>phasecong2.m</a> Phase congruency
code that combines edge and corner detection, and provides better
localization. Note this function is superseded by phasecong3.m and
phasecongmono.m and is only here for reference.
</ul>
<p>
<li type=circle><a href=PhaseCongruency/dispfeat.m>dispfeat.m</a> This
function provides visualisation and statistics of the different
feature types found in an image by phasecong. Typically you will find
a broad distribution of all feature types between step edges and
lines. This function needs <a
href=LineSegments/edgelink.m>edgelink.m</a> (see below).
<li type=square><a href=PhaseCongruency/odot.m>odot.m</a> Demonstrates
the actions of the 'Odot' and 'Oslash' operators on a 1D signal.
These operators allow one to decompose and combine signals in a way
that is consistent with the Local Energy model of feature perception.
<li><a href=PhaseCongruency/spatialgabor.m>spatialgabor.m</a> applies
a single oriented Gabor filter to an image.
<center>
<table width=50%>
<tr>
<td><img align=top src=WWWImages/whalesm.jpg> <br> <td><center> <img align=top
src=WWWImages/whalesmsym.jpg> <br>phase symmetry image</center>
</tr></table></center>
<li type=square><a href=PhaseCongruency/phasesym.m>phasesym.m</a> Code for
calculating phase symmetry. This can be used as a line and blob
detector. Phase symmetry is an illumination and contrast invariant
measure of symmetry in an image. (A bright circle is not more
'symmetric' than a grey circle as can be the case with some other
measures!).
<li type=square>
<a href=PhaseCongruency/phasesymmono.m>phasesymmono.m</a> This
function computes phase symmetry via monogenic filters. Has excellent
speed and much reduced memory requirements compared to phasesym.m
However you may prefer the output from phasesym's oriented filters.
<li type=square><a
href=PhaseCongruency/gaborconvolve.m>gaborconvolve.m</a> Code for
convolving an image with a bank of log-Gabor filters. A
pre-processing step for texture analysis, feature detection and
classification, etc.
<li type=circle><a
href=PhaseCongruency/plotgaborfilters.m>plotgaborfilters.m</a> A
function for plotting log-Gabor filters. This function is useful for
seeing what effect the various parameter settings have on the
formation of a log-Gabor filter bank used in the functions above.
<li type=square><a href=PhaseCongruency/monofilt.m>monofilt.m</a> An
implementation of Felsberg's monogenic filters. This function applies
a bank of monogenic filters to an image to obtain the 2D analytic signal
over a number of scales. As in gaborconvolve this can be used as a
pre-processing step for texture analysis, feature detection and
classification, etc.
<li type=square><a href=PhaseCongruency/highpassmonogenic.m>highpassmonogenic.m</a>
Applies highpassfilter and computes phase and amplitude via monogenic filters.
Requires <a href=FrequencyFilt/perfft2.m>perfft2.m</a>
<li type=square><a href=FrequencyFilt/filtergrid.m>filtergrid.m</a> Generates grid
for constructing frequency domain filters. Used by some of the functions above.
<li><a href=PhaseCongruency/Docs/convexpl.html>An explanation</a> of
the implementation of convolution with log-Gabor filters used in the
functions above.
</ul>
<p><b>References:</b>
<ul>
<li> Peter Kovesi,
<a href="http://www.peterkovesi.com/papers/ai97.pdf">
"Symmetry and Asymmetry From Local Phase".</a> AI'97, Tenth
Australian Joint Conference on Artificial Intelligence. 2 - 4
December 1997. Proceedings - Poster Papers. pp 185-190.
<li> Peter Kovesi,
<a href="http://www.cs.rochester.edu/u/brown/Videre/001/v13.html">
"Image Features From Phase Congruency".</a>
<i>Videre: A Journal of Computer Vision Research</i>. MIT
Press. Volume 1, Number 3, Summer 1999. <br>
Electronic publishing, even with a reputable publisher, can be
problematic. For some reason the MIT Press has chosen to no longer
maintain an archive of <i>Videre</i>. Fortunately an archive of the
journal can be found at the University of Rochester at
<a href =
"http://www.cs.rochester.edu/u/brown/Videre/">www.cs.rochester.edu/u/brown/Videre</a>.
<!-- <a href="http://mitpress.mit.edu/e-journals/Videre/001/v13.html"> -->
<li> Peter Kovesi,
"Edges Are Not Just Steps". Proceedings of <em>ACCV2002 The
Fifth Asian Conference on Computer Vision</em>, Melbourne Jan
22-25, 2002. pp 822-827.
<a href="http://www.peterkovesi.com/papers/ACCV62.pdf">(preprint)</a>
<li> Peter Kovesi, "Phase Congruency Detects Corners and Edges".
<i> The Australian Pattern Recognition Society Conference:
Digital Image Computing: Techniques and Applications DICTA 2003. </i>
December 2003. Sydney. pp 309-318.
<a href="http://www.peterkovesi.com/papers/phasecorners.pdf">(preprint)</a>
<li> Peter Kovesi,
"Invariant Measures of Image Features From Phase Information".
PhD Thesis, The University of Western Australia. 1996.
<a href="http://repository.uwa.edu.au/R/-?func=dbin-jump-full&object_id=5454&silo_library=GEN01"> Download page </a>
</ul>
<a name="spatial"></a>
<hr>
<h4>Spatial Feature Detection</h4>
<ul>
<li type=square><a href=Spatial/canny.m>canny.m</a> Canny edge
detector.
<li type=square><a href=Spatial/harris.m>harris.m</a> Harris corner
detector.
<li type=square><a href=Spatial/noble.m>noble.m</a> Noble's corner
detector.
<li type=square><a href=Spatial/shi_tomasi.m>shi_tomasi.m</a> The
Shi-Tomasi corner detector returns the minimum eigenvalue of the
structure tensor. This represents the ideal that the Harris and Noble
detectors attempt to approximate.
<li type=square><a href=Spatial/hessianfeatures.m>hessianfeatures.m</a>
Hessian feature detector.
<li type=square><a href=Spatial/fastradial.m>fastradial.m</a> An
implementation of Loy and Zelinski's fast radial feature
detector.
<li type=square><a href=Spatial/gaussfilt.m>gaussfilt.m</a> Wrapper
function for convenient Gaussian filtering.
<li type=square><a href=Spatial/derivative5.m>derivative5.m</a>
computes 1st and 2nd derivatives of an image using the 5-tap
coefficients given by Farid and Simoncelli. Use this function
instead of MATLAB's GRADIENT function for much more accurate results.
<li type=square><a href=Spatial/derivative7.m>derivative7.m</a>
computes derivatives using the 7-tap
coefficients given by Farid and Simoncelli.
<li><a href=Spatial/filterregionproperties.m>filterregionproperties.m</a>
Filters regions on their property's values. Allows you to select
blobs within a specified size or major axis orientation range etc
</ul>
<p><b>Reference:</b>
<ul>
<li><a href=Spatial/Docs/A_Combined_Corner_and_Edge_Detector.pdf>Scanned
images</a> of my photocopy of Harris and Stephens' paper 'A Combined
Corner and Edge Detector'.
</ul>
<p>
<a href="http://julialang.org">
<img style="vertical-align:middle"
src="https://lh5.googleusercontent.com/-Iqwvvbp-o6U/VHKv98UHkDI/AAAAAAAAJVU/RqwYqjkyADI/s1600/julia.png" width="50"></a>
For those working in <a href="http://julialang.org"> Julia</a> the
package
<a href="https://github.com/peterkovesi/ImageProjectiveGeometry.jl">ImageProjectiveGeometry.jl</a>
implements most of the functions above.
<a name="segmentation"></a>
<hr>
<h4>Segmentation</h4>
<ul>
<li type=square><a href=Spatial/slic.m>slic.m</a> Implementation of
Achanta et al's SLIC Superpixels.
<li type=square><a href=Spatial/spdbscan.m>spdbscan.m</a> Clustering
of superpixels using the DBSCAN algorithm.
<li type=square><a href=Spatial/regionadjacency.m>regionadjacency.m</a>
Computes adjacency matrix for an image of labeled regions, as
might be produced by a superpixel or graph cut algorithm.
<li type=square><a href=Spatial/cleanupregions.m>cleanupregions.m</a>
Cleans up small regions in a segmented image. (slow and a bit flakey,
use mcleanupregions.m below)
<li type=square><a href=Spatial/mcleanupregions.m>mcleanupregions.m</a>
Morphological clean up of small regions in a segmented image. (needs
<a href="Misc/circularstruct.m">circularstruct.m</a>)
<li type=square><a href=Spatial/finddisconnected.m>finddisconnected.m</a>
Finds groupings of disconnected labeled regions. Used by
mcleanupregions.m to reduce execution time.
<li type=square><a href=Spatial/makeregionsdistinct.m>makeregionsdistinct.m</a>
Ensures labeled regions are distinct.
<li type=square><a href=Spatial/renumberregions.m>renumberregions.m</a>
Renumbers regions in a labeled image so that they range from 1:maxRegions.
<li type=square><a href=Spatial/drawregionboundaries.m>drawregionboundaries.m</a>
Draw boundaries of labeled regions in an image.
<li type=square><a href=Spatial/maskimage.m>maskimage.m</a> Apply mask
to an image.
<li type=square><a href=Misc/dbscan.m>dbscan.m</a> Basic
implementation of DBSCAN clustering
<li type=square><a href=Misc/testdbscan.m>testdbscan.m</a> Function
to test/demonstrate dbscan.m
<li><a href="http://www.peterkovesi.com/projects/segmentation/">Example</a>
illustrating how you can use the functions above to perform basic
segmentation using SLIC superpixels and DBSCAN clustering.
</ul>
<a name="integral"></a>
<hr>
<h4>Integral Images</h4>
<ul>
<li type=square><a href=Spatial/integralimage.m>integralimage.m</a> computes
integral image of an image.
<li type=square><a href=Spatial/integralfilter.m>integralfilter.m</a>
performs filtering using an integral image.
<li type=square><a href=Spatial/intfilttranspose.m>intfilttranspose.m</a>
transposes an integral image filter specification.
<li type=square><a href=Spatial/integaverage.m>integaverage.m</a>
performs averaging filtering using an integral image. Computation
cost is independent of averaging filter size.
<li type=square>
<a href=Spatial/integgaussfilt.m>integgaussfilt.m</a>
This function approximates Gaussian filtering by repeatedly applying
integaverag.m . This allows smoothing at a very low computational cost
that is independent of the Gaussian size.
<li type=square><a href=Spatial/solveinteg.m>solveinteg.m</a>
This function is used by integgausfilt.m to solve for the multiple averaging
filter widths needed to approximate a Gaussian of desired standard deviation.
</ul>
<p><b>Reference:</b>
<ul>
<li><a href="http://www.peterkovesi.com/papers/FastGaussianSmoothing.pdf">
Fast Almost-Gaussian Filtering</a> <i> The Australian Pattern
Recognition Society Conference: DICTA 2010. </i> December
2010. Sydney. <br> This paper describes how to obtain high speed
approximate Gaussian filtering via integral images. There is no
computational justification for using crude box filters to approximate
Gaussians and their derivatives as is done, for example, by the SURF feature
detector.
</ul>
<a name="nonmax"></a>
<a name="hysthresh"></a>
<hr>
<h4>Non-Maxima Suppression and Hysteresis Thresholding</h4>
<center><img align=top src=WWWImages/baboon.pc.edge.gif></center>
<br>
<ul>
<li type=square><a href=Spatial/nonmaxsup.m>nonmaxsup.m</a> Code for
performing non-maxima suppression for edge images.
<li type=square><a href=Spatial/nonmaxsuppts.m>nonmaxsuppts.m</a> Code
for performing non-maxima suppression and thresholding of points
generated by a feature/corner detector. It optionally returns
sub-pixel feature locations. (Updated Jan 2016)
<li type=square><a href=Spatial/subpix2d.m>subpix2d.m</a> Sub-pixel
locations in a 2D image.
<li type=square><a href=Spatial/subpix3d.m>subpix3d.m</a> Sub-pixel
locations in a 3D volume or in 2D + scale space data.
<li type=square> <a href=Spatial/hysthresh.m>hysthresh.m</a> code for
performing hysteresis thresholding.
<li type=square> <a href=Spatial/featureorient.m>featureorient.m</a>
computes orientations on a feature image prior to nonmaximal
suppression in the case where no orientation information is available
from the feature detection process.
<li type=square> <a href=Spatial/smoothorient.m>smoothorient.m</a>
applies smoothing to an orientation field which can be useful before
applying nonmaximal suppression.
<li type=square> <a href=Spatial/adaptivethresh.m>adaptivethresh.m</a>
an implementation of Wellner's adaptive thresholding method.
</ul>
<a name="edgelink"></a>
<hr>
<h4>Edge Linking and Line Segment Fitting</h4>
<center>
<table>
<tr>
<td><img align=top src=WWWImages/shapes.gif> <br> <center>image</center></td>
<td><img align=top src=WWWImages/shapese.gif> <br> <center>edges</center></td>
<td><img align=top src=WWWImages/shapeseim.gif> <br> <center>labeled edges</center></td>
<td><img align=top src=WWWImages/shapesseg.gif> <br> <center>fitted line segments</center></td>
</tr></table></center><br>
<ul>
<li><a href=LineSegments/edgelink.m>edgelink.m</a>
edge linking function that forms lists of connected edge points from a
binary edge image. Needs findendsjunctions below.
<li><a href=LineSegments/filledgegaps.m>filledgegaps.m</a> Fills small
gaps in a binary edge map image. Can be useful to apply prior to edge
linking. Needs findisolatedpixels.m and findendsjunctions.m
<li><a href=LineSegments/drawedgelist.m>drawedgelist.m</a>
plots out a set of edge lists generated by edgelink or lineseg.
<li><a href=LineSegments/edgelist2image.m>edgelist2image.m</a>
transfers edgelist data back into a 2D image array.
<li><a href=LineSegments/lineseg.m>lineseg.m</a> forms
straight line segments fitted with a specified tolerance to the lists
of connected edge points.
<!-- Deprecated
<li type=square><a href=LineSegments/mergeseg.m>mergeseg.m</a> is used
by lineseg.m to merge co-linear segments that may have been separated
in the edge linking process.
<li type=square><a href=LineSegments/drawseg.m>drawseg.m</a> plots the
fitted line segments.
<li type=circle><a href=LineSegments/selectseg.m>selectseg.m</a>
allows you to interactively select segments from an image.
-->
<li type=square><a href=LineSegments/maxlinedev.m>maxlinedev.m</a> is
also used by lineseg.m to calculate deviations of the edge lists from
the fitted segments.
<li><a href=LineSegments/findendsjunctions.m>findendsjunctions.m</a>
finds line junctions and endings in a line/edge image.
<li><a href=LineSegments/findisolatedpixels.m>findisolatedpixels.m</a>
finds isolated pixels in an image.
<li><a href=LineSegments/cleanedgelist.m>cleanedgelist.m</a> cleans up
a set of edge lists generated by edgelink or lineseg so that isolated
edges and spurs that are shorter than a minimum length are removed.
There are some issues with this code and it can be memory intensive.
<li><a href=LineSegments/example/index.html>Example</a> of using these
functions above.
</ul>
<a name="step2line"></a>
<hr>
<h4>Test Grating for Edge Detection</h4>
<center>
<table>
<tr>
<td><img align=top src=WWWImages/step2line.gif> <br><center>Test image</center></td>
<td><img align=top src=WWWImages/step2line.canny.gif> <br><center>Canny edge image</center></td>
<td><img align=top src=WWWImages/step2line.pc.gif> <br><center>Phase congruency</center></td>
<td><img align=top src=WWWImages/step2linecoded.gif> <br><center>Colour coded for feature type</center></td>
</table> </center> <br>
<ul>
<li type=square><a href=PhaseCongruency/step2line.m>step2line.m</a>
Generates a test image where the feature type changes from a step edge
to a line feature from top to bottom, while retaining perfect phase
congruency. This test image indicates the importance of phase
congruency irrespective of the angle at which congruency occurs at
and, up to a point, irrespective of the rate at which the amplitude
spectrum decays with frequency. A gradient based edge detector
produces a double response for all features that have congruence of
phase at angles other than zero (towards the bottom of the test
image). The phase congruency detector marks features with a single
response. The colour coded image was generated by <a
href=PhaseCongruency/dispfeat.m>dispfeat.m</a>
<li type=square><a href=FrequencyFilt/circsine.m>circsine.m</a>
Generates a test image consisting of a circular sine wave grating.
Can also be used to construct circular phase congruent patterns.
<li type=square><a href=FrequencyFilt/starsine.m>starsine.m</a>
Generates a test image consisting of a star like sine wave grating
radiating out from the centre. As with circsine this function can be
used to construct star like phase congruent patterns.
</ul>
<a name="noisecomp"></a>
<hr>
<h4>Image Denoising</h4>
<center><img align=top src=WWWImages/srvb0019gamma-tn.jpg>
<img align=top src=WWWImages/gclean0019a-tn.jpg> </center><br>
<ul>
<li type=square><a href=PhaseCongruency/noisecomp.m>noisecomp.m</a>
Code for denoising images. This code differs from standard wavelet
denoising techniques in that it uses non-orthogonal wavelets, and
unlike existing techniques, ensures that phase information is
preserved in the image. Phase information is of crucial importance to
human visual perception. Also, this code <i>does</i> have an
effective way of determining threshold levels automatically.
<p>See the example below, under grey scale transformation and
enhancement, for an example of the use of this function.
</ul>
<p><b>Reference:</b>
<ul>
<li> Peter Kovesi,
<a href="http://www.peterkovesi.com/papers/denoise.pdf">
"Phase Preserving Denoising of Images". </a>
<i> The Australian Pattern Recognition Society Conference:
DICTA'99. </i> December 1999. Perth WA. pp 212-217.
</ul>
<a name="shapelet"></a>
<hr>
<h4>Surface Normals to Surfaces</h4>
<center>
<table>
<tr><td><img align=top src=WWWImages/rampneedlesm.png><br>
<center> Surface Normals </center></td>
<td> </td>
<td> <img align=top src=WWWImages/rampreconsm.png><br>
<center>Surface Reconstruction</center></td></tr>
</table>
</center>
<ul>
<li type=square><a href=Shapelet/shapeletsurf.m>shapeletsurf.m</a>
Function reconstructs an estimate of a surface from its surface
normals by correlating the surface normals with that those of a bank
of shapelet basis functions. The correlation results are summed to
produce the reconstruction. The sumation of shapelet basis functions
results in an implicit integration of the surface while enforcing
surface continuity.
<p>Note that the reconstruction is only valid up to a scale factor
(which can be corrected for). However the reconstruction process is
very robust to noise and to missing data values. Reconstructions (up
to positive/negative shape ambiguity) are possible where there is an
ambiguity of pi in tilt values. Low quality reconstructions are also
possible with just slant, or just tilt data alone. However, if you
have full gradient information you are better off with the Frankot
Chellappa algorithm below.
<li type=square><a
href=Shapelet/frankotchellappa.m>frankotchellappa.m</a> An
implementation of Frankot and Chellappa's algorithm for constructing
an integrable surface from gradient information. If you have full
gradient information in x and y this is probably the best algorithm to
use. It is very simple, very fast and highly robust to noise. If you
have surface normal information in the form of slant and tilt, and you
have an ambiguity of pi in your tilt data, or only have slant, then
try using shapeltsurf.m above.
<li type=square><a href=Shapelet/grad2slanttilt.m>grad2slanttilt.m</a>
Converts gradient values over a surface to slant and tilt angles.
<li type=square><a href=Shapelet/slanttilt2grad.m>slanttilt2grad.m</a>
Converts slant and tilt angles over a surface to gradients.
<li type=square><a href=Shapelet/needleplotgrad.m>needleplotgrad.m</a>
Generates a needle plot given surface gradients over a surface.
<li type=square><a href=Shapelet/needleplotst.m>needleplotst.m</a> Generates a
needle plot given slant and tilt values over a surface.
<li type=square><a href=Shapelet/testp.m>testp.m</a> Generates a
synthetic test surface along with its surface normals for testing
shapeletsurf.
</ul>
<p><b>Reference:</b>
<ul>
<li> Peter Kovesi,
<a href="http://www.peterkovesi.com/papers/shapeletsICCV.pdf">
"Shapelets Correlated with Surface Normals Produce Surfaces". </a>
10th IEEE International Conference on Computer Vision.
Beijing. pp 994-1001. 2005
<li><a href="http://www.peterkovesi.com/papers/ShapeletsICCV.ppt">
PowerPoint Slides</a>
<li><a href="http://www.peterkovesi.com/projects/shapefromcontour/index.html">
An example</a> of how much 3D shape you can get from very minimal
surface normal information.
</ul>
<a name="scalogram"></a>