Skip to content

Commit 2c51494

Browse files
committed
logの修正とファイル名の変更
1 parent 07eb97b commit 2c51494

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/mapping.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def mapping():
5050

5151
log = open(f'./log_demo_result.txt', 'a')
5252
log.write(f'{cnt}: x-axis= {abs(max_cx - min_cx)}, z-axis= {abs(max_cz - min_cz)}\n')
53-
log.close()
5453
cnt += 1
5554

5655
adjust_x = most_left_point - min_cx
@@ -89,6 +88,11 @@ def mapping():
8988
trim_img = img.crop((trim_left, trim_upper-img_margin,
9089
trim_right+img_margin, trim_lower+img_margin))
9190
trim_img.save("./created_data/target_image/sample_trim.png")
92-
trim_img.save(f"./stored_image/sample_trim_{trim_upper}.png")
91+
trim_img.save(f"./stored_image/sample_trim_{trim_upper:0.4f}.png")
92+
dashed_line = '-' * 80
93+
print(f'{dashed_line}')
94+
print(f'file_name: sample_trim_{trim_upper:0.4f}.png')
95+
log.write(f'file_name: sample_trim_{trim_upper:0.4f}.png\n')
96+
log.close()
9397
os.remove("./created_data/hand_data/input_coordinate.txt")
9498
os.remove("./created_data/hand_data/finish.txt")

0 commit comments

Comments
 (0)