Extract 80 by 80 patch from image by taking center point of each object in image.
1 回表示 (過去 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!