フィルターのクリア

Patch extraction from an image

10 ビュー (過去 30 日間)
Pravita Lekshmanan
Pravita Lekshmanan 2019 年 6 月 18 日
コメント済み: Pravita Lekshmanan 2019 年 6 月 21 日
How to extract a number of patches from the image

採用された回答

pankhuri kasliwal
pankhuri kasliwal 2019 年 6 月 18 日
if you want a patch of (size, size) :
% Get the size of the image
[rows, columns, numberOfColorChannels] = size(yourImage);
% Determine starting and ending rows and columns.
row1 = floor(rows/2 - size/2);
col1 = floor(columns/2- size/2);
% Extract sub-image using imcrop():
subImage = imcrop(yourImage, [col1, row1, size, size]);
you may also refer to this link for more information
  1 件のコメント
Pravita Lekshmanan
Pravita Lekshmanan 2019 年 6 月 21 日
Thankyou ma'am for your answer.
It was very useful.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by