![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282754/image.png)
How to display only red parts of an image?
10 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282750/image.png)
The Image above is an output from using the savitky_golay_filter made by Image Analyst. I am working on taking edges out of an image. I need only the red edges I produced from the image, curve fit and find Trajectory.
This is a college project Im working. Would be great if someone could guide me as deadlines shortcoming.
Attached is the image below of how I want my output to be:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282751/image.png)
I am stuck at part (c). Outline.
Thanks in advace,
~Harshan Desu
0 件のコメント
採用された回答
Mehmed Saad
2020 年 4 月 8 日
編集済み: Mehmed Saad
2020 年 4 月 8 日
You have to get R component which means you have to find out value of R greater than both G and B in RGB data. (May be some threshold like 2 times G or B etc)
suppose the variable rgbtest has the data of pciture you've posted
then
red_comp = rbgtest(:,:,1)>rbgtest(:,:,2) & rbgtest(:,:,1)>rbgtest(:,:,3);
imshow(red_comp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282754/image.png)
5 件のコメント
Mehmed Saad
2020 年 4 月 8 日
編集済み: Mehmed Saad
2020 年 4 月 8 日
I think you should spend some time on it. Also try playing with the conditions which differs red from other colors
red_comp = rbgtest(:,:,1)>rbgtest(:,:,2) & rbgtest(:,:,1)>rbgtest(:,:,3);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!