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 f09f3a1

Browse files
committed
small fixes to ActiveShapeModel.py, Image_preperation.py, Initial_pose_estimator.py, Initialisation.py
1 parent 26e25bf commit f09f3a1

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

‎ActiveShapeModel.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -110,53 +110,53 @@ def show_evolution(img, points_list):
110110
plt.show()
111111

112112

113-
# In[95]:
113+
# In[95]:
114114

115115

116-
points = active_shape_n_times(edge_img, tooth, pca_tooth, 5, 10)
116+
points = active_shape_n_times(edge_img, tooth, pca_tooth, 5, 10,10)
117117

118118

119-
# In[102]:
119+
# In[102]:
120120

121121

122-
new_points = points[1]
122+
new_points = points[1]
123123

124124

125-
# In[103]:
125+
# In[103]:
126126

127127

128-
fig, ax = plt.subplots(figsize=(15, 15))
129-
plt.imshow(radiograph)
130-
plt.plot(new_points[:,0], new_points[:,1], 'ro', markersize=1)
131-
plt.show()
128+
fig, ax = plt.subplots(figsize=(15, 15))
129+
plt.imshow(radiograph)
130+
plt.plot(new_points[:,0], new_points[:,1], 'ro', markersize=1)
131+
plt.show()
132132

133133

134-
# In[3]:
134+
# In[3]:
135135

136136

137-
img = fm.load_img_piece()
138-
tooth = fm.load_tooth_of_piece(4)
139-
landmarks = fm.load_landmarks_std()
140-
tooth_variations = landmarks[:,4]
141-
edge_img, pca_tooth = preperation(img, tooth_variations)
142-
fm.show_with_points(img, tooth)
137+
img = fm.load_img_piece()
138+
tooth = fm.load_tooth_of_piece(4)
139+
landmarks = fm.load_landmarks_std()
140+
tooth_variations = landmarks[:,4]
141+
edge_img, pca_tooth = preperation(img, tooth_variations)
142+
fm.show_with_points(img, tooth)
143143

144144

145-
# In[38]:
145+
# In[38]:
146146

147147

148-
#points_array = active_shape_scale_n_times(img, tooth, pca_tooth, 15, 4, 10)
149-
points_array = active_shape_n_times(edge_img, tooth, pca_tooth, 10, 20 ,9)
148+
#points_array = active_shape_scale_n_times(img, tooth, pca_tooth, 15, 4, 10)
149+
points_array = active_shape_n_times(edge_img, tooth, pca_tooth, 10, 20 ,9)
150150

151151

152-
# In[39]:
152+
# In[39]:
153153

154154

155-
show_evolution(img, points_array)
155+
show_evolution(img, points_array)
156156

157157

158-
# In[22]:
158+
# In[22]:
159159

160160

161-
points_array[0].shape
161+
points_array[0].shape
162162

‎Image_preperation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import cv2
88
import numpy as np
99
import math
10+
import matplotlib
1011
from scipy import ndimage, signal
1112
import matplotlib.pyplot as plt
1213
from skimage.color import rgb2gray
@@ -16,6 +17,7 @@
1617

1718
from skimage.util.dtype import dtype_range
1819
from skimage.util import img_as_ubyte
20+
from skimage.util import img_as_float
1921
from skimage.morphology import disk
2022
from skimage.filters import rank
2123
from skimage import exposure

‎Initial_pose_estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,5 @@ def active_contour_match(img, init):
183183
# In[19]:
184184

185185

186-
radiograph.shape
186+
# radiograph.shape
187187

‎Initialisation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def showControls():
1313
cv2.putText(popup,'Pageup/down: Bottom/top tooth distance',(10,55), font, 0.5,(240,255,255),1,cv2.LINE_AA)
1414
cv2.putText(popup,'" / ": Save current position to file',(10,100), font, 0.5,(240,255,255),1,cv2.LINE_AA)
1515
cv2.putText(popup,'" . ": Activate automatic initialisation',(10,115), font, 0.5,(240,255,255),1,cv2.LINE_AA)
16-
cv2.putText(popup,'" \' ": Activate automatic initialisation',(10,130), font, 0.5,(240,255,255),1,cv2.LINE_AA)
16+
cv2.putText(popup,'" \' ": Do segmentation',(10,130), font, 0.5,(240,255,255),1,cv2.LINE_AA)
1717
cv2.putText(popup,'" , ": Change to next radiograph',(10,145), font, 0.5,(240,255,255),1,cv2.LINE_AA)
1818
cv2.putText(popup,'" m ": Reset model',(10,160), font, 0.5,(240,255,255),1,cv2.LINE_AA)
1919
cv2.putText(popup,'" esc ": Close program',(10,175), font, 0.5,(240,255,255),1,cv2.LINE_AA)

‎Report.docx

1.6 MB
Binary file not shown.

0 commit comments

Comments
(0)

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