how can I crop a region of RGB image based on pixel value?
1 回表示 (過去 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 件)
参考
カテゴリ
Help Center および File Exchange で Feature Detection and Extraction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!