how can I crop a region of RGB image based on pixel value?
조회 수: 5 (최근 30일)
이전 댓글 표시
hey, I have a RGB image (attached). I need to crop the region that has color only, and remove the bright surrounding part. for this reason I used threshold (pixel value= 215) as follows, however this results in a vector which is not desired. I need the color region to be remained as an new RGB image...
original= imread('filename'); original= original(original<215);
댓글 수: 0
채택된 답변
Image Analyst
2014년 9월 19일
Since the regions may not be rectangular, which is required for a crop, you'll have to mask the areas. See my File Exchange for several color segmentation demos that can do that: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
댓글 수: 1
Image Analyst
2014년 9월 19일
Attached are three masking demos.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!