From: Lulu Ardiansyah on 20 Jan 2010 23:23 I still can not able to combine the images. The value of delta X and delta Y was very small, less than 1 pixel. How do I overlay them? Is there any code to perform this? This is the code I use to get delta X and delta Y: %===Start code=== clc numImage = 4; foldersName = 'dataset_30db'; fileNames = 'testimage.bmp'; %===Load base image================= fileName = ['result_' int2str(1) '_' fileNames]; fullName = fullfile(foldersName, fileName); baseImage = imread(fullName); baseImage = rgb2gray(baseImage); %=================================== dxs = zeros(1, numImage-1); dys = zeros(1, numImage-1); %=================================== for i=2:numImage %===Load target image=============== fileName = ['result_' int2str(i) '_' fileNames]; fullName = fullfile(foldersName, fileName); targetImage = imread(fullName); targetImage = rgb2gray(targetImage); %===Do phase correlation============ [dxs(i-1), dys(i-1)] = ExtPhaseCorrelation(baseImage, targetImage); %=================================== end %TODO next is combine the image based on dxs and dys %===End code=== File 'ExtPhaseCorrelation.m' I've upload, please be downloaded at ( http://www.mathworks.com/matlabcentral/fileexchange/26417 ) Thank you for your help.
From: Rob Campbell on 21 Jan 2010 00:19 Personally, when I've done this sort of thing I round to the nearest pixel. I have so many other problems with my images that if it's out by less then I pixel I'm happy. There are probably clever ways involving anti-aliasing of achieving sub-pixel resolution but this might not be necessary in practice.
First
|
Prev
|
Pages: 1 2 Prev: Set Focus on a specific cell in a ui table Next: fuction "primarykey" does not work |