Patch extraction from an image
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pravita Lekshmanan
le 18 Juin 2019
Commenté : Pravita Lekshmanan
le 21 Juin 2019
How to extract a number of patches from the image
0 commentaires
Réponse acceptée
pankhuri kasliwal
le 18 Juin 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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polygons dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!