Wants to input an rgb image and get the classified image as an rbg instead of greyscale
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
renit anthony
el 28 de Sept. de 2020
Comentada: Image Analyst
el 29 de Sept. de 2020
I am new to Matlab and I am finding it difficult to input a color image and give the classified output as color image. Instead I am only able to do for greyscale image. I have done the code for greyscale image. Please help me out. Can someone help me with the code to output as coloured image rather than a grayscale image. I have attached my code as well.
0 comentarios
Respuesta aceptada
Image Analyst
el 28 de Sept. de 2020
Have you tried colormap() and colorbar() to apply a colormap to the gray levels in the classified image?
6 comentarios
Image Analyst
el 29 de Sept. de 2020
You can't. Once an RGB true color image has been indexed into a monochrome (indexed) image plus a colormap, it's been quantized and you will lose some of the original colors. You'll get a posterized-looking image if you use ind2rgb(grayImage, map), though it might look reasonable if you chose enough colors to use in the colormap, like a hundred or more. If you have only 16 or fewer colors in your colormap, it will look like a cartoon - posterized.
This has nothing whatsoever with deep learning or classification though.
Saying that this particular image has a stop sign in it classifies that image as having a stop sign in it. But it does not classify every single pixel in the image. For example, it does not say this pixel is from a stop sign, that pixel is from a roadway, and the other pixel is from the sky (or car, or lawn, or whatever). For that you'd need something like SegNet rather than a classification CNN. SegNet will classify every pixel in an image but CNN just says if your image has an object from a predefined set of objects in it.
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows 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!