how to create a surface from a gray level image?
古いコメントを表示
Let I be a gray level image and (x,y) be the standard coordinate. I multiplied this image 'I' with a constant value μ for μ=[0,1] and called it as scaled version of the image. Then i want to plot this scaled version image in a surface 'S' which is parameterised by ψ:(x,y)-->(x,y,μI(x,y)).How can i solve this?
14 件のコメント
KSSV
2017 年 2 月 15 日
Once you have a matrix, surf works to plot the surface. Did you try surf ?
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
z will be your image values, x,y if you provide it will take or else the indices according to the size of image.
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
I=imread('lena.jpg');
[m,n,p] = size(I) ;
x=[1:n]; y=[1:m];
z=I(:,:,1);
surf(x,y,z);
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
Read about imread. When you read a image you will get RGB values, your z will be 3D matrix. 1,2,3 corresponds to R (Red),G (green),B (blue) respectively.
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
[m,n,p] = size(I) ;
x=[1:n]; y=[1:m];
surf(x,y,z); % z will be a 1D matrix
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
What for you want to use?
Naseeba PP
2017 年 2 月 15 日
KSSV
2017 年 2 月 15 日
For tangent and normals why you need z? x, y are needed isn't it?
Naseeba PP
2017 年 2 月 15 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!