我需要得到16位摄影测量目标,所以我尝试使用这个网站的代码:https://mpetroff.net/2018/05/photogrammetry-targets/,但当它试图用tempfile创建临时目录时,它给出了错误,我似乎不明白为什么。在
with tempfile.TemporaryDirectory() as tmp_dir:
# Create sheets of targets in temporary directory
pdfs = []
for n in range(math.ceil(len(CODES) / ROWS / COLUMNS)):
pdf_filename = os.path.join(tmp_dir, str(n) + '.pdf')
create_sheet(n, pdf_filename)
pdfs.append(pdf_filename)
# Combine sheets into a single PDF
subprocess.run(['pdftk'] + pdfs + ['cat', 'output', FILENAME])
目前没有回答
相关问题 更多 >
编程相关推荐