Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IAH public
DeProj
Commits
b37c53f0
Commit
b37c53f0
authored
Jul 03, 2020
by
Jean-Yves TINEVEZ
Browse files
Plot the 3 euler angles.
parent
e9470ec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
RunExample.m
View file @
b37c53f0
...
...
@@ -166,12 +166,26 @@ end
%% Plot the segmentation.
figure
close
all
figure
(
'Position'
,
[
1204
20
600
1000
]
)
% imshow( ~I, [ 0 2 ], ...
% 'Border', 'tight', ...
% 'XData', [ 1 size( I, 2 ) ] * pixel_size, ...
% 'YData', [ 1 size( I, 1 ) ] * pixel_size )
ax1
=
subplot
(
3
,
1
,
1
);
hold
on
axis
equal
ax2
=
subplot
(
3
,
1
,
2
);
hold
on
axis
equal
ax3
=
subplot
(
3
,
1
,
3
);
hold
on
axis
equal
% plot( junction_graph, ...
% 'XData', junction_graph.Nodes.Centroid(:,1), ...
...
...
@@ -189,17 +203,35 @@ for i = 1 : n_objects
o
=
objects
(
i
);
P
=
o
.
boundary
;
% err = o.perimeter / o.uncorr.perimeter - 1;
err
=
abs
(
o
.
euler_angles
(
2
)
);
% err = o.perimeter / o.uncorr.perimeter - 1;
alpha
=
rad2deg
(
o
.
euler_angles
(
1
)
);
beta
=
rad2deg
(
o
.
euler_angles
(
2
)
);
gamma
=
rad2deg
(
o
.
euler_angles
(
3
)
);
patch
(
P
(:,
1
),
P
(:,
2
),
P
(:,
3
),
err
,
...
if
alpha
<
0
alpha
=
180
+
alpha
;
end
if
beta
>
90
beta
=
180
-
beta
;
end
patch
(
ax1
,
P
(:,
1
),
P
(:,
2
),
P
(:,
3
),
alpha
,
...
'LineWidth'
,
2
);
patch
(
ax2
,
P
(:,
1
),
P
(:,
2
),
P
(:,
3
),
beta
,
...
'LineWidth'
,
2
);
text
(
o
.
center
(
1
),
o
.
center
(
2
),
o
.
center
(
3
)
+
0.5
,
num2str
(
o
.
id
),
...
'HorizontalAlignment'
,
'center'
,
...
'VerticalAlignment'
,
'middle'
)
patch
(
ax3
,
P
(:,
1
),
P
(:,
2
),
P
(:,
3
),
gamma
,
...
'LineWidth'
,
2
);
% text( ax1, o.center(1), o.center(2), o.center(3) + 0.5, num2str( o.id ), ...
% 'HorizontalAlignment', 'center', ...
% 'VerticalAlignment', 'middle' )
end
axis
equal
colorbar
colormap
(
ax1
,
'hsv'
)
colorbar
(
ax1
)
colorbar
(
ax2
)
colormap
(
ax3
,
'hsv'
)
colorbar
(
ax3
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment