フィルターのクリア

How to invert the colors in an image

53 ビュー (過去 30 日間)
Sebastian
Sebastian 2014 年 2 月 5 日
回答済み: Gerard Broussard 2020 年 8 月 2 日
Hi, I want to invert the colors in a grayscale image that i am reading with matlab. Whenever the image is black, matlab gives me 0 values, and whenever the image is white matlab gives me certain values. I want to invert this so whenever is black matlab gives me the values and whenever is white matlab gives me 0 values. Can you help me with this? Thank you!

採用された回答

Dishant Arora
Dishant Arora 2014 年 2 月 5 日
doc imcomplement
  1 件のコメント
Sebastian
Sebastian 2014 年 2 月 5 日
Thank you!

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

その他の回答 (1 件)

Gerard Broussard
Gerard Broussard 2020 年 8 月 2 日
You can also do something like
colormap(flipud(gray))
if you don't want ot re-compute the image you're working with

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by