how can i detect triangle
3 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153775/image.png)
how can i detect green colour triangle from pic
2 件のコメント
採用された回答
Image Analyst
2016 年 6 月 12 日
You can segment out that green triangle using either color or shape - your choice. I'm attaching demos for each. Feel free to adapt as needed.
3 件のコメント
Image Analyst
2016 年 6 月 13 日
Don't use for loops and simply vectorize it. Get rid of the size() and two for loops and simply have this:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Get pixels that are greener than they are red or blue.
Triangle = greenChannel > redChannel & greenChannel > blueChannel;
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!