how can i get the three component keeping R, G, B value, when the binary “1”, with others setting to 0.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Muhammad Hammad Malik
el 10 de Feb. de 2018
Comentada: Muhammad Hammad Malik
el 11 de Feb. de 2018
i need matlab code, i am doing image processing for red fruit detection. kindly help me in getting R , G , B value when the binary “1”, with others setting to 0. guide me as soon as possible.thanks. @Image Analyst and others pls
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de Feb. de 2018
Use .* to multiply the mask and the color image.
For example,
RGB = imread('peppers.png');
bw = im2binarize(RGB); %find brighter parts
mask = bw(:,:,[1 1 1]); %make the mask 3d
maskedRGB = RGB .* mask;
3 comentarios
Walter Roberson
el 11 de Feb. de 2018
That sounds like a different question. There have been several previous questions about fruit detection that might help. Search for tag:fruit
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox 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!