本文整理汇总了Python中Analysis.addRGB方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.addRGB方法的具体用法?Python Analysis.addRGB怎么用?Python Analysis.addRGB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis.addRGB方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import addRGB [as 别名]
def __init__(self,Pathx, B):
path = "/media/iglu/Data/DatasetIglu"
i = 0
Analysis.initial()
files = open("Output_1_L.txt", 'w')
start_time = timeit.default_timer()
for x in os.listdir(path):
# if i == 0:
# i += 1
# continue
# else:
if Pathx != x:
continue
for y in os.listdir(path + "/" + x) :
if (y != "Objects.txt") and not y.endswith(".zip"):
# print path+"/"+x+"/"+y+"/k1"
f = open(path + "/" + x + "/" + y + "/k1" + "/List.txt", 'r')
f2 = open(path + "/" + x + "/" + y + "/speech.txt", 'r')
speak = f2.readline()
if speak == 'This...':
sp = 1
elif speak == 'That...':
sp = 2
else:
sp = 0
mn = 0
for line in f:
Time = line
file1 = next(f).rstrip('\n')
file2 = next(f).rstrip('\n')
Label = next(f).rstrip('\n')
# files.write(RGB.__str__())
# files.write(Depth.__str__())
# files.write(Label+" "+x+" "+file1+"\n")
if mn == 0:
RGB = cv2.imread(path + "/" + x + "/" + y + "/k1" + "/RGB/" + file1)
Depth = cv2.imread(path + "/" + x + "/" + y + "/k1" + "/Depth/" + file2)
Analysis.addDepth(Depth)
Analysis.addRGB(RGB)
Analysis.addSpeech(sp)
Analysis.addScene(Label)
else:
if mn == 2:
mn = -1
mn += 1
# print "Enviado " + x + " " + y
i += 1
elapsed = timeit.default_timer() - start_time
print "Tiempo: " + elapsed.__str__()
print "Starting Training"
start_time = timeit.default_timer()
Analysis.CompleteAnalysis(B, False, True, 0.3, files)
files.close()
# Analysis.Mostrar()
# code you want to evaluate
elapsed = timeit.default_timer() - start_time
print "Tiempo: " + elapsed.__str__()
示例2: __init__
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import addRGB [as 别名]
def __init__(self,B):
path = "/media/iglu/Data/Dataset/DatasetIglu/Dataset_cleaned_v4"
i = 0
Analysis.initial()
files = open("Output_1_L.txt", 'w')
start_time = timeit.default_timer()
for x in os.listdir(path):
# if i == 0:
# i += 1
# continue
# else:
f = open(path+"/"+x+"/List.txt",'r')
for line in f:
Time = line
file1 = next(f).rstrip('\n')
file2 = next(f).rstrip('\n')
Label = next(f).rstrip('\n')
RGB = cv2.imread(path+"/"+x+"/RGB/"+file1)
Depth = cv2.imread(path+"/"+x+"/Depth/"+file2)
# files.write(RGB.__str__())
# files.write(Depth.__str__())
# files.write(Label+" "+x+" "+file1+"\n")
Analysis.addDepth(Depth)
Analysis.addRGB(RGB)
Analysis.addScene(Label)
i += 1
print "Enviado "+x
# if i > 150:
# break
elapsed = timeit.default_timer() - start_time
print "Tiempo: "+elapsed.__str__()
print "Starting Training"
start_time = timeit.default_timer()
Analysis.CompleteAnalysis(B,True,0.3,files)
files.close()
#Analysis.Mostrar()
# code you want to evaluate
elapsed = timeit.default_timer() - start_time
print "Tiempo: "+elapsed.__str__()
示例3:
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import addRGB [as 别名]
R=False
if x.startswith("Test"):
continue
for y in os.listdir(path + "/" + x):
for z in os.listdir(path +"/"+x +"/"+y+"/"):
if z.endswith("_crop.png"):
R=path + "/" + x + "/" + y+"/"+z
if z.endswith("_depthcrop.png"):
D=path + "/" + x + "/" + y+"/"+z
if R and D:
if mn == 0:
i+=1
RGB = cv2.imread(R)
Depth = cv2.imread(D)
Analysis.addDepth(Depth)
Analysis.addRGB(RGB)
else:
if mn == 15:
mn = -1
mn += 1
D = R = False
print "Enviado " + x + " " + y+" i:"+i.__str__()
path = "/media/iglu/Data/rgbd-scenes"
for x in os.listdir(path):
# if i == 0:
# i += 1
# continue
# else:
mn=0
D=False
R=False