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 9b229bc

Browse files
committed
reset values for good demo
1 parent 9a9ab79 commit 9b229bc

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

‎ActiveShapeModel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def active_shape_n_times(edge_img, tooth_points, pca_tooth, length,alfa, n_times
5757
return points
5858

5959

60-
def preperation_all(radiograph, all_landmarks,scale):
60+
def preperation_all(radiograph, all_landmarks):
6161

6262
#median = prep.median_filter(radiograph)
6363
# edge_img = prep.edge_detection_low(median)
64-
edge_img = prep.calc_external_img_active_contour(radiograph,scale)
64+
edge_img = prep.calc_external_img_active_contour(radiograph)
6565
pcas_tooth = PCA.PCA_analysis_all(all_landmarks, None)
6666

6767
return edge_img, pcas_tooth

‎Image_preperation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def local_equalization(img, size = 50):
8383
selem = disk(size)
8484
return rank.equalize(img, selem=selem)
8585

86-
def median_filter(img, size = 9):
86+
def median_filter(img, size = 3):
8787
return scipy.signal.medfilt(img, size).astype(np.uint8)
8888

8989
def edge_detection_low(img):
@@ -97,7 +97,7 @@ def edge_detection_high(img):
9797
return canny(img)
9898

9999
def canny(img):
100-
return feature.canny(img, sigma=0.1)
100+
return feature.canny(img, sigma=2)
101101

102102
def calc_external_img(img):
103103

‎Initialisation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ def InitializeASM(directory = "_Data\\Radiographs\\*.tif"):
205205
cv2.setMouseCallback('Radiograph',moveTeeth,(resized_image,all_landmarks_std))
206206

207207
tempShow("Calculating Edges + PCA...")
208-
# global img
208+
global img
209209
grays = cv2.cvtColor(resized_image, cv2.COLOR_BGR2GRAY)
210-
edge_img, pca_teeth = asm.preperation_all(grays, all_landmarks_std,scale)
210+
edge_img, pca_teeth = asm.preperation_all(grays, all_landmarks_std)
211+
edge_img = cv2.resize(edge_img.astype(np.uint8),size)
211212
tempShow("Calculating Edges + PCA : DONE!")
212213

213214

@@ -339,6 +340,7 @@ def InitializeASM(directory = "_Data\\Radiographs\\*.tif"):
339340
elif k == 111:
340341
for i in range(0,8):
341342
tooth_points = output[0,i,:,:]
343+
342344
points = asm.active_shape(edge_img, tooth_points, pca_teeth[i], distance,alpha)
343345
# print(all_landmarks_std[0,0,:,:])
344346
output[0,i,:,:] = points

‎initial_position.npy

0 Bytes
Binary file not shown.

0 commit comments

Comments
(0)

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