필터 지우기
필터 지우기

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 CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by