Adding projection information for registered image.

1 Ansicht (letzte 30 Tage)
Suresh Manchikanti
Suresh Manchikanti am 13 Mai 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...

Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by