How can I make automatic crop?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello
How can I make automatic crop around core? like
.
댓글 수: 2
Rik
2018년 6월 24일
Have a read here (or here for more general advice) and here. It will greatly improve your chances of getting an answer.
채택된 답변
Image Analyst
2018년 6월 24일
Why do you need to crop it?
Anyway, if you do for some reason, you can just binarize and look for the min and max row and column.
binaryImage = imbinarize(grayImage);
[rows, columns] = find(binaryImage);
row1 = min(rows);
row2 = max(rows);
col1 = min(columns);
col2 = max(columns);
croppedGrayImage = grayImage(row1:row2, col1:col2);
imshow(croppedImage);
댓글 수: 5
Image Analyst
2018년 6월 24일
편집: Image Analyst
2018년 6월 24일
Well there's the problem. You totally ignored my code in my answer, and did it your own (wrong) way. Why?
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!