Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DeProj
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IAH public
DeProj
Commits
b37c53f0
Commit
b37c53f0
authored
4 years ago
by
Jean-Yves TINEVEZ
Browse files
Options
Downloads
Patches
Plain Diff
Plot the 3 euler angles.
parent
e9470ec2
No related branches found
No related tags found
1 merge request
!9
Rework the whole code for the upcoming publication.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
RunExample.m
+41
-9
41 additions, 9 deletions
RunExample.m
with
41 additions
and
9 deletions
RunExample.m
+
41
−
9
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment