MATLAB Answers

Adding projection information for registered image.

1 view (last 30 days)
Suresh Manchikanti
Suresh Manchikanti on 13 May 2016
Dear all, I am working on Image registration using FFT Phase correlation algorithm. I saw example in matlab and it is working fine. Now i want to store the registered image. As the input and reference images are in UTM projection,i want to retain the map projection to output registered image also. Following code used:
refFile='E:/suresh/1629663101.tif';
inFile='E:/suresh/1629663101_inp.tif';
subRegFilename='E:/suresh/1629663101_reg.tif';
fixed = imread(refFile);
moving = imread(inFile);
tformEstimate = imregcorr(moving,fixed,'similarity');
Rfixed = imref2d(size(fixed));
movingReg = imwarp(moving,tformEstimate,'OutputView',Rfixed);
figure, imshowpair(fixed,movingReg,'falsecolor');
Now what i tried :
info_subRef = geotiffinfo(refFile);
subR_reg = R_subRef;
subR_reg.RasterSize = size(movingReg);
geotiffwrite(subRegFilename, movingReg, subR_reg, ...
'GeoKeyDirectoryTag', info_subRef.GeoTIFFTags.GeoKeyDirectoryTag);
It generates output image as same size as reference image. But i want only registered image portion. So please help in this. Waiting for your support...

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.