How from uint8 to 0 and 1?
10 次查看(过去 30 天)
显示 更早的评论
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 ?
0 个评论
采纳的回答
更多回答(2 个)
Chad Greene
2014-11-6
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
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!