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!