I import the following image which is a [583x673x3] uint8 :
and i would like the convert the grey/black color to origianally black.How it can be ?

 채택된 답변

Sean de Wolski
Sean de Wolski 2014년 11월 6일

0 개 추천

Igray = rgb2gray(I);
BW = im2bw(Igray,graythresh(Igray));
imshow(BW)

댓글 수: 2

grayImage = uint8(255 * BW);
Dimitrios
Dimitrios 2014년 11월 6일
Sorry i deleted the question,because i found it.but thanks for the answer.For others my question was 'How to convert the resulted image again to uint8?'

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Youssef  Khmou
Youssef Khmou 2014년 11월 6일
편집: Youssef Khmou 2014년 11월 6일

0 개 추천

rgb2gray(im2double(X));

댓글 수: 1

Dimitrios
Dimitrios 2014년 11월 6일
thank you for your answer, but the image remained the same.

댓글을 달려면 로그인하십시오.

Chad Greene
Chad Greene 2014년 11월 6일

0 개 추천

Tinker with this threshold value:
threshold = 250;
A = imread('export_fig_out.png');
A(A>=threshold)=255;
A(A<threshold)=0;
imshow(A)

댓글 수: 2

Chad Greene
Chad Greene 2014년 11월 6일
Before adjusting the image, (if you have the image processing toolbox) try imhist(A) to see where values in A lie relative to the gray scale.
Sean de Wolski
Sean de Wolski 2014년 11월 6일
graythresh separates modes for you :)

댓글을 달려면 로그인하십시오.

카테고리

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

질문:

2014년 11월 6일

댓글:

2014년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by