Remove pixel == 1 from an RGB image

3 ビュー (過去 30 日間)
Riccardo Rossi
Riccardo Rossi 2019 年 2 月 27 日
編集済み: KSSV 2019 年 2 月 27 日
Hi everybody, hi have an RGB image and i want to remove all pixels which were equal to 1 from the following command:
FIND=(A(:,:,1)>=175 & (A(:,:,1)<=193));
with A that is the 4000x6000x3 uint8 image.
How can i do it?
Thank you!

採用された回答

KSSV
KSSV 2019 年 2 月 27 日
編集済み: KSSV 2019 年 2 月 27 日
YOu cannot remove them, replace them with any other value.......
A = I(:,:,1) ;
idx = A>=175 & A<=193;
A(idx) = 0 ;
I(:,:,1) = A ;
  4 件のコメント
Riccardo Rossi
Riccardo Rossi 2019 年 2 月 27 日
okay, but i just want to select (A(:,:,1)>=175 & (A(:,:,1)<=193)) and not (A(:,:,i)>=175 & (A(:,:,i)<=193))
KSSV
KSSV 2019 年 2 月 27 日
編集済み: KSSV 2019 年 2 月 27 日
Okay..then remove the loop.....Edited the code.

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

その他の回答 (0 件)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by