cropping satellite image (RGB image)
1 回表示 (過去 30 日間)
古いコメントを表示
hy everyone,,, i want to ask a question,, I have some satellite imagery that I downloaded from USGS. I want to doing cropping to the part of that image that unnecessary and take just the areas that I need. I want to ask how to cut the unnecessary part of that image and leaving only the parts that I need? and how to keep cropping I did, have same result for every image? because I need the same cropping area for each image.
can anyone help me? need reply soon.
best regards _trimurti_ God bless you.
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 9 月 6 日
On one of the images, use
[croppedIMG, rect] = imcrop(IMG);
The value stored in to rect will then be the cropping rectangle. You can apply that to another image as an extra argument to imcrop:
croppedIMG2 = imcrop(IMG2, rect);
5 件のコメント
Walter Roberson
2011 年 9 月 10 日
imwrite() the cropped images rather than using save() of the displayed version of the cropped image.
Harry MacDowel
2011 年 9 月 7 日
Unhas,
To save the image in high quality, look for the print function
doc print
You can even set PaperPositionMode. I usually specify a landscape A4, then the resolution.
My sample:-
set(figurehnd,'PaperUnits','centimeters','PaperType','A4','PaperPosition',[0 0 29.7 21.0]);
print(figurehnd,'-djpeg','-r400',g);
figurehnd is the Figure handle variable. -r400 means resolution at 400 dpi.
1 件のコメント
Walter Roberson
2011 年 9 月 7 日
See also this FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F_I.27m_having_trouble_with_the_built_in_MATLAB_functions.
参考
カテゴリ
Help Center および File Exchange で Image Processing and Computer Vision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!