Remove pixel == 1 from an RGB image

1 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by