Borrar filtros
Borrar filtros

How convert an m x n x p image sequence to an m x n x 3 x p sequence efficiently?

2 visualizaciones (últimos 30 días)
Hi, I would like to convert my grayscale image sequence to an rgb sequence, and I'm wondering if it possible to do it without a loop?

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 12 de Nov. de 2013
Editada: Andrei Bobrov el 12 de Nov. de 2013
A - array with size [m x n x p].
out = reshape(repmat(reshape(A,[],p),3,1),[m n 3 p]);

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by