Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c112190

Browse files
cleanup
1 parent a9c089f commit c112190

File tree

3 files changed

+80
-377
lines changed

3 files changed

+80
-377
lines changed

‎.ipynb_checkpoints/ActiveShapeModel-checkpoint.ipynb

Lines changed: 28 additions & 162 deletions
Large diffs are not rendered by default.

‎ActiveShapeModel.ipynb

Lines changed: 28 additions & 162 deletions
Large diffs are not rendered by default.

‎ActiveShapeModel.py

Lines changed: 24 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# coding: utf-8
33

4-
# In[36]:
4+
# In[5]:
55

66

77
import MatchingModelPoints as match
@@ -97,9 +97,29 @@ def show_evolution(img, points_list):
9797
plt.plot(landmark[:,0], landmark[:,1], 'ro', markersize=1)
9898

9999
plt.show()
100+
101+
102+
def testings():
103+
104+
fig, ax = plt.subplots(figsize=(15, 15))
105+
plt.imshow(radiograph)
106+
plt.plot(new_points[:,0], new_points[:,1], 'ro', markersize=1)
107+
plt.show()
108+
109+
img = fm.load_img_piece()
110+
tooth = fm.load_tooth_of_piece(4)
111+
landmarks = fm.load_landmarks_std()
112+
tooth_variations = landmarks[:,4]
113+
edge_img, pca_tooth = preperation(img, tooth_variations)
114+
fm.show_with_points(img, tooth)
115+
116+
#points_array = active_shape_scale_n_times(img, tooth, pca_tooth, 15, 4, 10)
117+
points_array = active_shape_n_times(edge_img, tooth, pca_tooth, 10, 20 ,9)
118+
119+
show_evolution(img, points_array)
100120

101121

102-
# In[92]:
122+
# In[2]:
103123

104124

105125
if __name__ == "__main__":
@@ -120,55 +140,6 @@ def show_evolution(img, points_list):
120140
plt.imshow(radiograph)
121141
plt.plot(tooth[:,0], tooth[:,1], 'ro', markersize=1)
122142
plt.show()
123-
124-
125-
# In[95]:
126-
127-
128-
points = active_shape_n_times(edge_img, tooth, pca_tooth, 5, 10)
129-
130-
131-
# In[102]:
132-
133-
134-
new_points = points[1]
135-
136-
137-
# In[103]:
138-
139-
140-
fig, ax = plt.subplots(figsize=(15, 15))
141-
plt.imshow(radiograph)
142-
plt.plot(new_points[:,0], new_points[:,1], 'ro', markersize=1)
143-
plt.show()
144-
145-
146-
# In[3]:
147-
148-
149-
img = fm.load_img_piece()
150-
tooth = fm.load_tooth_of_piece(4)
151-
landmarks = fm.load_landmarks_std()
152-
tooth_variations = landmarks[:,4]
153-
edge_img, pca_tooth = preperation(img, tooth_variations)
154-
fm.show_with_points(img, tooth)
155-
156-
157-
# In[38]:
158-
159-
160-
#points_array = active_shape_scale_n_times(img, tooth, pca_tooth, 15, 4, 10)
161-
points_array = active_shape_n_times(edge_img, tooth, pca_tooth, 10, 20 ,9)
162-
163-
164-
# In[39]:
165-
166-
167-
show_evolution(img, points_array)
168-
169-
170-
# In[22]:
171-
172-
173-
points_array[0].shape
143+
144+
points = active_shape_n_times(edge_img, tooth, pca_tooth, 10, 1,1)
174145

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /