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 Exchange에서 Biological 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