Filter löschen
Filter löschen

Convert a <1023x1023 double> to a rgb image

1 Ansicht (letzte 30 Tage)
Rafael Freire
Rafael Freire am 1 Apr. 2011
I have a data < 1023x1023 double> the values is 0 and 1. How i convert this type of data in a rgb image data, and a binary image type of data?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 1 Apr. 2011
Let A be the array, then
Argb = cat(3,A,A,A);
Or
Argb = repmat(A,1,1,3);
And
Abinary = logical(A);
  2 Kommentare
Rafael Freire
Rafael Freire am 1 Apr. 2011
the rapmat function doesn't work but the rest works very well thanks
Jan
Jan am 1 Apr. 2011
Working: Argb = repmat(A, [1,1,3]);
@Rafael: If the solution works, please accept the answer such that the readers can see, that the problem is solved already.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by