How to NaN selected threshold values of red,green and blue using matlab code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
sandhya sandhya
el 23 de Jun. de 2017
Respondida: Jan
el 23 de Jun. de 2017
How to NaN selected threshold values of red,green and blue using matlab code
1 comentario
Jan
el 23 de Jun. de 2017
Please mention any details. What are the inputs, how is the threshold applied? Does "NaN values" is a verb, which means setting the pixel values to NaN?
Respuesta aceptada
Rik
el 23 de Jun. de 2017
Don't hide information in the tags. Next time, have a read here. Your question is not clear, so this is the answer to what I guess to be your answer. I didn't take the time to check for syntax errors.
IM=rand(100,100,3);IM=uint8(255*IM);%dummy data
[r,c]=find(IM(:,:,1)==60 & IM(:,:,2)==100 & IM(:,:,3)==120);
IM(r,c,:)=NaN;
0 comentarios
Más respuestas (1)
Jan
el 23 de Jun. de 2017
A bolöd guess:
mask = Img(:, :, 1) == 60 & ...
Img(:, :, 2) == 100 & ...
Img(:, :, 3) == 120;
Img(cat(3, mask, mask, mask)) = NaN;
0 comentarios
Ver también
Categorías
Más información sobre Numeric Types en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!