フィルターのクリア

how to set the pixel values to 1 and o's based on some threshold values

4 ビュー (過去 30 日間)
senthil vadivu
senthil vadivu 2016 年 11 月 20 日
コメント済み: senthil vadivu 2016 年 11 月 21 日
Eg. if redpixel>th and redpixel>green and greenpixel>blue then mark all the pixel values as 1 otherwise to 0

採用された回答

Guillaume
Guillaume 2016 年 11 月 20 日
binaryimage = rgbimage(:, :, 1) > threshold ... red pixels greater than threshold
& ... AND
rgbimage(:, :, 1) > rgbimage(:, :, 2) ... red greater than green
& ... AND
rgbimge(:, :, 2) > rgbimage(:, :, 3); ... green greater than blue
Or in one line:
binaryimage = rgbimage(:, :, 1) > threshold & rgbimage(:, :, 1) > rgbimage(:, :, 2) & rgbimge(:, :, 2) > rgbimage(:, :, 3);

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by