Can a binary image be converted into color image by multiplying each value by 2^i?

1 回表示 (過去 30 日間)
Anushka
Anushka 2015 年 8 月 20 日
回答済み: Image Analyst 2015 年 8 月 20 日
Can a binary image be converted into color image by using the following equation?
were,fxy x and y values of a binary image fand i varies from i=0 to 7.Then does pxy forms a RGB image?
Or what would be the value of pxy?

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 8 月 20 日
No, that expression is for updating a location, not for converting it to color.
There is not enough information to interpret the formula much further.
  2 件のコメント
Anushka
Anushka 2015 年 8 月 20 日
編集済み: Walter Roberson 2015 年 8 月 20 日
Does it converts the binary values to decimal.
Walter Roberson
Walter Roberson 2015 年 8 月 20 日
No, you need either divisions or a bunch of shifts and subtractions to convert binary to decimal.
It might be trying to talk about converting binary fractions or floating point values to integer, but if so then it needs either a round() or a floor() around the fx,y * 2^i part.

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


Image Analyst
Image Analyst 2015 年 8 月 20 日
No. To convert a binary image to a color image that is 3-D but black and white, concatenate your binary image to three planes in the Z direction:
rgbImage = cat(3, binaryImage, binaryImage, binaryImage);

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by