how to make background white?

回答 (1 件)

Image Analyst
Image Analyst 2015 年 11 月 4 日

0 投票

First segment your image into foreground and background, perhaps using some techniques from my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
So now you have a background mask binary image that defines the background. To set those pixels equal to the bright value allowed for that class of image use:
maxGrayLevel = intmax(class(grayImage))
grayImage(mask) = maxGrayLevel;
where grayImage is your gray scale image and mask is your logical binary background mask.

カテゴリ

ヘルプ センター および File ExchangeModify Image Colors についてさらに検索

質問済み:

2015 年 11 月 4 日

回答済み:

2015 年 11 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by