フィルターのクリア

Wants to input an rgb image and get the classified image as an rbg instead of greyscale

1 回表示 (過去 30 日間)
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.

採用された回答

Image Analyst
Image Analyst 2020 年 9 月 28 日
Have you tried colormap() and colorbar() to apply a colormap to the gray levels in the classified image?
  6 件のコメント
renit anthony
renit anthony 2020 年 9 月 29 日
I just want to know how to get a greyscale images color back using the original image using colormap.
Image Analyst
Image Analyst 2020 年 9 月 29 日
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.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by