code for sampling an image to form patches
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ANCY
le 31 Déc 2013
Réponse apportée : Image Analyst
le 31 Déc 2013
If any one knows the code for sampling an image to make the larg image into small sections then please share it with me.
0 commentaires
Réponse acceptée
Walter Roberson
le 31 Déc 2013
patch_cell = mat2cell( 8*ones(1,size(IMAGE,1)/8), 8*ones(1,size(IMAGE,2)/8), size(IMAGE,3) );
for 8 x 8 patches.
Then patch_cell{5,19} would be the 5th row of patches, 19th patch over.
2 commentaires
Walter Roberson
le 31 Déc 2013
This code does exactly that, using 8 x 8 pixel subdivisions of the image array named IMAGE. If you want to use a different size such as 64 x 64, replace the 8's by 64's.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox 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!