1
1
2
2
# coding: utf-8
3
3
4
- # In[36 ]:
4
+ # In[5 ]:
5
5
6
6
7
7
import MatchingModelPoints as match
@@ -97,9 +97,29 @@ def show_evolution(img, points_list):
97
97
plt .plot (landmark [:,0 ], landmark [:,1 ], 'ro' , markersize = 1 )
98
98
99
99
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 )
100
120
101
121
102
- # In[92 ]:
122
+ # In[2 ]:
103
123
104
124
105
125
if __name__ == "__main__" :
@@ -120,55 +140,6 @@ def show_evolution(img, points_list):
120
140
plt .imshow (radiograph )
121
141
plt .plot (tooth [:,0 ], tooth [:,1 ], 'ro' , markersize = 1 )
122
142
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 )
174
145
0 commit comments