Adding projection information for registered image.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!