conver bmp image to color image

1 回表示 (過去 30 日間)
fereshte
fereshte 2014 年 6 月 28 日
コメント済み: fereshte 2014 年 6 月 28 日
hi.i have a color image and use the crop function to select part of it.but Output image isnt color.why? how get a color image after cropping?
im=imread('5 2R.bmp');
croppedImage = imcrop(im,[0.5 80.5 45 38]);
imshow(croppedImage);

採用された回答

Image Analyst
Image Analyst 2014 年 6 月 28 日
Is im an indexed image? What does this say
[im, colorMap] = imread('5 2R.bmp');
whos colorMap
[rows, columns, numberOfColorChannels] = size(im)
  3 件のコメント
Image Analyst
Image Analyst 2014 年 6 月 28 日
編集済み: Image Analyst 2014 年 6 月 28 日
Please take my suggestion so I can diagnose your problem. What does the command window say when you run the commands I asked you to run? In the meantime, try
rgbImage = ind2rgb(im, colorMap);
fereshte
fereshte 2014 年 6 月 28 日
thanks a lot.great

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRed についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by