Borrar filtros
Borrar filtros

Patch extraction from an image

10 visualizaciones (últimos 30 días)
Pravita Lekshmanan
Pravita Lekshmanan el 18 de Jun. de 2019
Comentada: Pravita Lekshmanan el 21 de Jun. de 2019
How to extract a number of patches from the image

Respuesta aceptada

pankhuri kasliwal
pankhuri kasliwal el 18 de Jun. de 2019
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 comentario
Pravita Lekshmanan
Pravita Lekshmanan el 21 de Jun. de 2019
Thankyou ma'am for your answer.
It was very useful.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by