30 lines
999 B
Mathematica
30 lines
999 B
Mathematica
|
function affichage_3D_melange(points_3D,liste_t,liste_R,couleurs_points,couleurs_cameras)
|
||
|
|
||
|
% Affichage des caméras :
|
||
|
taille_camera = 0.5;
|
||
|
for i = 1:size(liste_t,2)
|
||
|
t_i = liste_t(:,i);
|
||
|
R_i = liste_R(:,:,i);
|
||
|
position = single(t_i'*R_i); % Attention : Matlab a sa propre logique !
|
||
|
orientation = single(R_i'); % Idem
|
||
|
absPose = rigid3d(orientation,position);
|
||
|
if nargin==5
|
||
|
plotCamera('AbsolutePose',absPose,'Size',taille_camera,...
|
||
|
'Color',couleurs_cameras(i,:),'Label',num2str(i),'Opacity',0);
|
||
|
else
|
||
|
plotCamera('AbsolutePose',absPose,'Size',taille_camera,...
|
||
|
'Color','b','Label',num2str(i),'Opacity',0);
|
||
|
end
|
||
|
hold on;
|
||
|
end
|
||
|
grid on;
|
||
|
axis off;
|
||
|
|
||
|
% Affichage du nuage de points 3D :
|
||
|
nuage_points_3D = pointCloud(points_3D,'Color',couleurs_points);
|
||
|
|
||
|
pcshow(nuage_points_3D,'VerticalAxis','y','VerticalAxisDir','down','MarkerSize',45);
|
||
|
xlabel('$X$','FontSize',20,'Interpreter','Latex');
|
||
|
ylabel('$Y$','FontSize',20,'Interpreter','Latex');
|
||
|
zlabel('$Z$','FontSize',20,'Interpreter','Latex');
|