rgbImage = imread(fullFileName);
I want to only get the top 20% of the image. How can I do it?
For example, for this image
I only want to get
Thanks!

 採用された回答

Guillaume
Guillaume 2017 年 3 月 27 日
編集済み: Guillaume 2017 年 3 月 27 日

0 投票

This is simple matrix indexing:
croppedimage = rgbimage(1:round(size(rgbimage, 1)*0.2), :, :)
Alternatively, use imcrop

その他の回答 (0 件)

質問済み:

2017 年 3 月 27 日

編集済み:

2017 年 3 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by