IVR MATLAB CODE

This task does a Bayesian classifier identification of flat parts for the IVR review. An example of the execution is below.

Relevant files are:

adapt.mdoes adaptive thresholding
bgremove.muses the background intensity to remove illumination gradients
blocks.matthe stored statistical model file
buildmodel.mcomputes the statistical model given the labeled feature vectors
complexmoment.mcalculates the complex central moments
classify.mfinds the best classification
cleanup.muses image morphology to remove holes and spurs
conv1d.m1D convolution
doall.mtop level training and classification process
dohist.mcomputes the hsitogram of pixel values
esthomog.mestimates the homography between 2 planar views
extractprops.mfinds a feature vector for the largest region
findthresh.mfinds the threshold for binarization
getlargest.mselects the largest of the connected image regions
getproperties.mgets compactness and moment invariants
liveimagejpg.macquires a live captured image
mahalanobis.mcomputes the Mahalanobis distance
multivariate.mcomputes the probability of a multivariate Gaussian distributed variable
mybwarea.mcomputes binary region area w/o using the image proc. toolkit (bwarea)
mybwlabel.mlabels binary image into connected regions w/o using the image proc. toolkit (bwlabel)
mybwperim.mcomputes binary region perimeter w/o using the image proc. toolkit (bwperim)
mygausswin.mcreates a gaussian smoothing window w/o using the sig. proc. toolkit (gausswin)
myim2bw.mthresholds a grey image w/o using the image proc. toolkit (im2bw)
myimdilate.mdoes image dilation w/o using the image proc. toolkit (imdilate)
myimerode.mdoes image erosion w/o using the image proc. toolkit (imerode)
myjpgload.mloads a prestored JPG file
myrgb2gray.mconverts a RGB image to grey w/o using the image proc. toolkit (rgb2gray)
testdata1/f1.jpgPart 1 image 1
testdata1/f10.jpgPart 1 image 2
testdata1/f11.jpgPart 1 image 3
testdata1/f12.jpgPart 1 image 4
testdata1/f2.jpgPart 2 image 1
testdata1/f3.jpgPart 2 image 2
testdata1/f4.jpgPart 2 image 3
testdata1/f5.jpgPart 2 image 4
testdata1/f6.jpgPart 3 image 1
testdata1/f7.jpgPart 3 image 2
testdata1/f8.jpgPart 3 image 3
testdata1/f9.jpgPart 3 image 4
partgradgr.jpgtest image
remap.mprojective transfer example
hzinput.jpgprojective transfer test image
lightgradgr.jpgtest image
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        
doall(2)
Model file name (filename)
?blocks
Number of classes (int)
?3
Want to acquire training data (0,1)
?1
Training image file stem (filestem)
?testdata1/f
Use live training data (0,1)
?0
Number of training images (int)
?12
Train image 1 true class (1..3)
?1
Train image 2 true class (1..3)
?1
Train image 3 true class (1..3)
?1
Train image 4 true class (1..3)
?1
Train image 5 true class (1..3)
?2
Train image 6 true class (1..3)
?2
Train image 7 true class (1..3)
?2
Train image 8 true class (1..3)
?2
Train image 9 true class (1..3)
?3
Train image 10 true class (1..3)
?3
Train image 11 true class (1..3)
?3
Train image 12 true class (1..3)
?3

Want to use live test data (0,1)
?0
Test image file stem (filestem)
?testdata1/f
true class (1..3)
?1
evaluations =    61.2911         0         0
class = 1

Want to process another image 2 (0,1)
?1
true class (1..3)
?1
evaluations =    61.2911         0         0
class = 1

Want to process another image 3 (0,1)
?1
true class (1..3)
?1
evaluations =    61.2911         0         0
class =      1

Want to process another image 4 (0,1)
?1
true class (1..3)
?1
evaluations =    61.2911         0         0
class =      1
           
Want to process another image 5 (0,1)
?1
true class (1..3)
?2
evaluations =    
class =            2

Want to process another image 6 (0,1)
?1
true class (1..3)
?2
evaluations =    0    1.7356         0
class =      2

Want to process another image 7 (0,1)
?1
true class (1..3)
?2
evaluations =    0    1.7356         0
class =      2


Want to process another image 8 (0,1)
?1
true class (1..3)
?2
evaluations =    0    1.7356         0
class =      2

Want to process another image 9 (0,1)
?1
true class (1..3)
?3
evaluations =        0.0000     0.0000   37.2140
class =             3

Want to process another image 10 (0,1)
?1
true class (1..3)
?3
evaluations =    0.0000     0.0000   37.2140
class =      3

Want to process another image 11 (0,1)
?1
true class (1..3)
?3
evaluations =   0.0000     0.0000   37.2140
class =      3

Want to process another image 12 (0,1)
?1
true class (1..3)
?3
evaluations =   0.0000     0.0000   37.2140
class =      3

Want to process another image 13 (0,1)
?0
ans =
scatter matrix (rows are true, cols are classified)

Scatter =

     4     0     0
     0     4     0
     0     0     4

>>             

Back to IVR index page


This page is maintained by the course lecturer, Bob Fisher, r.b.fisher@ed.ac.uk, room 2107D JCMB, ext 513441


Home : Teaching : Courses : Ivr 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh