def readGroundTruth(datasetTxtFilepath):
sunDirList = []
imageFileNames = []
with open(datasetTxtFilepath) as f:
for line in f:
lineItems = line.split()
fname = lineItems[0]
sunDir = lineItems[1:4]
sunDir = [float(i) for i in sunDir]
if azZenTarget:
sunAzZen = [0, 0]
sunAzZen[0] = math.degrees(math.atan2(sunDir[0], sunDir[2]))
sunAzZen[1] = math.degrees(math.acos(-sunDir[1]))
sunDirList.append(sunAzZen)
else:
sunDirList.append(sunDir)
imageFileNames.append(fname)
return sunDirList, imageFileNames
评论列表
文章目录