how to change the images into 3d

Antworten (2)

Youssef  Khmou
Youssef Khmou am 27 Mai 2013

0 Stimmen

try surf, here is example :
I=im2double(imread('circuit.tif'));
surf(I);
shading interp

8 Kommentare

ajith
ajith am 27 Mai 2013
in a set of images how to write the coding sir
I1=imread('a4y4na.jpg');
figure(1),
surf(I1), shading interp
I2=imread('2rca3di.jpg');
figure(2),
surf(I2), shading interp
I2=imread('2u54xsh.jpg');
figure(3),
surf(I3), shading interp
ajith
ajith am 27 Mai 2013
sir i need to combine all the input images to makes the 3d images how to make its
Youssef  Khmou
Youssef Khmou am 27 Mai 2013
you mean like RGB image?
ajith
ajith am 27 Mai 2013
Bearbeitet: ajith am 27 Mai 2013
sir,may be
I1=im2double(imread('a4y4na.jpg'));
I2=im2double(imread('2rca3di.jpg'));
I2=im2double(imread('2u54xsh.jpg'));
[m n]=size(I1);
D=zeros(m,n,3);
D(:,:,1)=I1;
D(:,:,2)=I2;
D(:,:,3)=I3;
Here D is your 3D matrix
ajith
ajith am 27 Mai 2013
Bearbeitet: ajith am 27 Mai 2013
imwrite(D,'ss.jpg');
I=im2double(imread('ss.jpg'));
surf(I);
shading interp
it shows
Warning: Matrix dimensions must agree, not rendering mesh
Warning: Matrix dimensions must agree, not rendering mesh
Warning: Matrix dimensions must agree, not rendering mesh
Warning: Matrix dimensions must agree, not rendering mesh
Youssef  Khmou
Youssef Khmou am 27 Mai 2013
Bearbeitet: Youssef Khmou am 27 Mai 2013
ok here how it works :
2D MATRIX CAN BE VIEWED AS 2D FUNCTION IN 3D FRAME LIKE THE FIRST EXAMPLE ABOVE, M-N-3 is considered 3D MATRIX AS RGB OR HSV IMAGE BUT CAN NOT BE VIEWED IN 3D FRAME ONLY YOU CAN VIEW THE CHANNELS R,G,B :
imwrite(D,'ss.jpg');
I=im2double(imread('ss.jpg'));
figure, surf(I(:,:,1)), shading interp
hold on,
surf(I(:,:,2));
surf(I(:,:,3)), hold off

Melden Sie sich an, um zu kommentieren.

Image Analyst
Image Analyst am 27 Mai 2013

0 Stimmen

I think you need to first get a Z matrix, then do a surface rendering with delaunay or friends:
TRI = delaunay(X,Y,Z)
See the help for visualizations and sample code.

Gefragt:

am 27 Mai 2013

Community Treasure Hunt

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

Start Hunting!

Translated by