template matching (semi-automatic finding of control points)
Pablo d'Angelo
pablo.dangelo at web.de
Mon May 12 21:18:46 BST 2003
Hi together,
I'm doing an image processing class at the university, and my topic was
"template matching using cross correlation", so I took hugin as an
example and added a semic automatic control point finder, wich actually
works pretty well, but isn't perfect yet.
I just checked it into the current cvs, so that people can play with it
:) and give some feedback.
after loading the files, select a region in the left image window, and
hugin will try to find the template in the other one by using a three
level (source image size /16, size/4 and real size) correlation.
the combobox on the lower right has other "correlation" or difference
measurement methods, but they are not working yet. the proper
correlation coefficient is really the best measure of all of them, but
it takes the longest time. the number left of it specifies a "cutof"
point, i.e when to stop looking for corosponding points.
(range -1 .. 1, 1 = perfect correlation, 0 = totally uncorrelated, -1:
inversly correlated (perfect negative of the template)). choose lower
values if no corrosponding region is found (useful range: 0.5 - .8,
depending on the focus/exposure differences of the pictures).
hugin saves images that show the correlation results for the different
sizes under: pyramid4.png, pyramid2.png, pyramid1.png. dark red = corr
coefficent = 1, dark blue corr coeff = -1, white: corr coeff = 0.
This only works well on recitiliniar input images, but it should be
possible to extend it to fisheye lenses as well by undistoring the
images, before doing the correlation.
In the progress of making the model toolkit independant, the load/save
functionality has also gone.. From wednesday on I'll have some time
to finally decide on the qt <-> wxwin issue.
ciao
Pablo
--
http://wurm.wohnheim.uni-ulm.de/~redman/
Please use PGP
More information about the ptX
mailing list