Extract 80 by 80 patch from image by taking center point of each object in image.
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2014-5-6
% 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 个评论
Image Analyst
2014-5-8
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]);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!