Normal Map Displayed As RGB Values

I would like to build a normal map displayed as RGB Values like this example Normal Maps. How can I create Normal Maps with Matlab ?
Thanks.
Kind regards.
Gilles

1 件のコメント

Debanga
Debanga 2014 年 1 月 11 日
編集済み: Debanga 2014 年 1 月 11 日
% Try this example
[X,Y] = meshgrid(1:.1:100,1:.1:100);
R = sin(Y/1) + eps;
Z = R;
[nx,ny,nz] = surfnorm(X,Y,Z);
b = reshape([nx ny nz], size(nx,1), size(nx,2),3);
b = ((b+1)./2).*255;
imshow(uint8(b));
-DRN

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeBiological and Health Sciences についてさらに検索

タグ

質問済み:

2013 年 11 月 19 日

編集済み:

2014 年 1 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by