def getGroundTruth(fileNameGT):
'''
Returns the ground truth maps for roadArea and the validArea
:param fileNameGT:
'''
# Read GT
assert os.path.isfile(fileNameGT), 'Cannot find: %s' % fileNameGT
full_gt = cv2.imread(fileNameGT, cv2.CV_LOAD_IMAGE_UNCHANGED)
#attention: OpenCV reads in as BGR, so first channel has Blue / road GT
roadArea = full_gt[:,:,0] > 0
validArea = full_gt[:,:,2] > 0
return roadArea, validArea
评论列表
文章目录