I was given image https://elearning.uh.edu/bbcswebdav/pid-570151-dt-content-rid-4178856_1/courses/H_20133_ECE_1331_11115/image1%281%29.jpg. How can i create new matrix that contains indices for green values that are larger than a random chosen intensity threshold in mxn size and mxnx3 size. Thanks you very much

2 件のコメント

Walter Roberson
Walter Roberson 2013 年 10 月 9 日
We do not have permission to view that image.
jason nguyen
jason nguyen 2013 年 10 月 9 日
i'm sorry about that.

サインインしてコメントする。

回答 (2 件)

ES
ES 2013 年 10 月 9 日
編集済み: ES 2013 年 10 月 9 日

1 投票

do an
imread
image and then from the result matrix,
Resultant Matrix
Output=[InputMatrix>Threshold].*InputMatrix;
of course, care about data types. [InputMatrix>Threshold] will be of boolean type and InputMatrix will be uint8. convert them all to uint8.
Image Analyst
Image Analyst 2013 年 10 月 9 日

0 投票

greenChannel = rgbImage(:,:,2);
binaryImage = greenChannel > someThresholdValue;
Most likely that's all you'd need. THat can do everything. If for some reason you need actual row and column indices, then you can get them with find():
[rows, columns] = find(binaryImage);
but like I said, it's highly unlikely you'd need that. If you think you do, then let me know why you think you need that and what you're going to do with that information.

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

製品

質問済み:

2013 年 10 月 9 日

回答済み:

2013 年 10 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by