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일

0 개 추천

Is im an indexed image? What does this say
[im, colorMap] = imread('5 2R.bmp');
whos colorMap
[rows, columns, numberOfColorChannels] = size(im)

댓글 수: 3

fereshte
fereshte 2014년 6월 28일
편집: fereshte 2014년 6월 28일
im is a original bmp image and i extraced part of this image by imcrop.but i want a color image in output.how do it?
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개)

카테고리

도움말 센터File Exchange에서 Blue에 대해 자세히 알아보기

태그

질문:

2014년 6월 28일

댓글:

2014년 6월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by