关于Metashape的读取图片的问题

问题遇到的现象和发生背景

我想要读取一个文件夹里的图片,但是用了好几个功能都读不了

用代码块功能插入代码,请勿粘贴截图

主要是用了两种方法,这个是第一种

Metashape.Application.getOpenFileNames("D:\photoscan_auto\photo", ".JPG")

错误提示是这个:TypeError: descriptor 'getOpenFileNames' for 'Metashape.Metashape.Application' objects doesn't apply to a 'str' object

第二种方法是这样的

###### 运行结果及报错内容 

```python
doc = Metashape.Document
chunk = Metashape.Chunk
image = []
path = 'D:\photoscan_auto\photo'
filetype = '.JPG'
for root, dirs, files in os.walk(path):
    for fname in files:
        if filetype in fname:
            image.append(fname)
chunk.addPhotos(filenames=image)

错误提示是这个:TypeError: descriptor 'addPhotos' of 'Metashape.Metashape.Chunk' object needs an argument