what do the parameters represent in s = struct('cd​ata',zeros​(vidHeight​,vidWidth,​3,'uint8')​,... 'colormap',[]); ?

2 ビュー (過去 30 日間)
Niharika k
Niharika k 2016 年 5 月 2 日
回答済み: Walter Roberson 2016 年 5 月 2 日
what do the field values mean?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 5 月 2 日
cdata is color data. It can be a 2 dimensional or 3 dimensional array. If it is a 3 dimensional array then it indicates RGB values directly and the colormap would be ignored. If cdata is a 2 dimensional array, then it must be indices into the colormap data.
colormap should be empty for RGB images. For pseudocolor images, it must be a something x 3 array of color information in the order Red, Blue, Green. The data in the cdata array is then used to index the colormap array in order to determine the color for each pixel.

カテゴリ

Help Center および File ExchangeColor and Styling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by