Extract 80 by 80 patch from image by taking center point of each object in image.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,i want to Extract 80 by 80 patch from image by taking center point of each object in image. This is gray level image.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 6 Mai 2014
% Get the size of the image
[rows, columns, numberOfColorChannels] = size(yourImage);
% Determine starting and ending rows and columns.
row1 = floor(rows/2 - 40);
col1 = floor(columns/2-40);
% Extract sub-image using imcrop():
subImage = imcrop(yourImage, [col1, row1, 80, 80]);
3 Kommentare
Image Analyst
am 8 Mai 2014
Nearly the same as what I already showed you:
% Determine starting and ending rows and columns.
row1 = floor(c(2) - 40);
col1 = floor(c(1) - 40);
% Extract sub-image using imcrop():
subImage = imcrop(yourImage, [col1, row1, 80, 80]);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!