How to crop/mask image using matlab ?
이전 댓글 표시
how to do cropping on an image ?

댓글 수: 5
Armylia Dewi
2022년 6월 15일
KSSV
2022년 6월 15일
You want to mask the black pixel region?
Armylia Dewi
2022년 6월 15일
Armylia Dewi
2022년 6월 15일
채택된 답변
추가 답변 (1개)
Image Analyst
2022년 7월 9일
See my attached lung segmentation demo.

It should be easy for you to adapt even though your images are in a different orientation.
Once you have the mask, you can crop your image to the bounding box of just the lungs like this
[r, c] = find(mask);
row1 = min(r);
row2 = max(r);
col1 = min(c);
col2 = max(c);
croppedImage = maskedImage(row1:row2, col1:col2);
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

