![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() |
Tzu Yen's Matlab CodesLittle tool codes:logfile.m
logfile - log the time-taking batch operation into a text file
data logged include:
start & end time, operation & comment, files processed
Usage:
logfile(startTime,operationComment,operation,processed)
showprogress.m
showprogress - show batch processing progress in image window with text
program has 3 parts,
1. initialisation before entering the for loop
2. actual running in the for loop
3. wrapping up after the for loop
Usage: showprogress(part,range,current,figNo,imsize)
addgrid.m
addgrid - add a matrix with grid lines of a certain value
Usage:
gridMatrix = addgrid(cleanMatrix,rowIndex,colIndex,gridValue)
cleangrid.m
cleangrid - clean up matrix with grid line of same value
Usage:
[cleanMatrix,rowIndex,colIndex] = cleangrid(gridMatrix,gridValue)
addLocationbar.maddLocationbar - add a location bar at the bottom of an image Usage: locationbar=addLocationbar(im,current,range,barH,posW,bgColor,fgColor)outlierRemoveT.m Written for removing outlier for correspondance problem (eg. pk's RANSAC Robust Estimation)
outlierRemoveT: outlier removal using delaunay triangulation for localisation
triangle flip and displacement magnitude & direction to determine outlier
Usage: [xy1_or,xy2_or] = outlierRemoveT(xy1,xy2,figNo,im1,im2,debug)
Graphics/Visiontriftensor.m
triftensor: This function computes the trifocal tensor from 7 or more matching points in
three images. This code follows the normalised linear algorithm and
algebraic minimization algorithm given by Hartley and Zisserman p393 (2nd Ed).
Usage: [T, e2, e3] = triftensor(x1, x2, x3)
This function make use of
minAlg_5p6.m,
e_from_T.m,
homo.m and
pk's
normalise2dpts.m.
makeC.m
makeC: This function is use to calculate camera calibration matrix
from modelling software anim8or's camera
pos and pyr are the camera location and orientation wrt the world coordinate.
For information about anim8or free modelling software, see www.anim8or.com
Usage: [C,U,Tcru,im] = makeC(pos,pyr,fov,imWH,fig,points,name)
triRigidTrans.m ![]()
triRigidTrans - triangle tranformation as Rigid as possible,
also called "Least distortion"
the idea is to extract out the rotation component Rnf
and interpolate the rotation in angle.
Usage: [T,Tdecomp,elements,ABCforPlot] = triRigidTrans(ABC,abc,figNo,infoOn)
This function make use of
arrowsimple.m,
HR.m and
br.m.
perspRect.m
perspRect - this function let the user choose a perspectively distorted
rectangular region and rectified the image back to a
rectangle.
Usage: imRect = perspRect(im,sze,option)
This function make use of
homography2d.m,
imTrans.m and
show.m
from Peter Kovesi and polyplot.m,
homo.m.
Decomposition of colour image
show6 - display RGB and HSV color components of an image Fourier Transform
fourier - display fourier transform of image Magnitude displayed using Grayscale; Phase displayed using Hue. Reference for colour representation of phase angle
phasecolor - display of using color to represent phase angle matching 360 deg of angle to 0-1 and use it as Hue. Both Saturation and Values are full (1). Understanding composition of colour components
colorComp - display RGB and HSV color components Just for Fun - images in TEXT formDisplay colour image as text in HTML![]() Click here for a sample output image2html - Convert a color image into color text art in html Display image using Chinese characters
Click here for a sample Gallery | Monalisa Matrix style
A small database of fonts can be downloaded from here: School of Computer Science & Software Engineering The University of Western Australia Crawley, Western Autralia. 6009 Homepage: http://www.csse.uwa.edu.au/~wongt Please report any bugs and/or suggest enhancements to ![]() |