示例#1
0
def main():
    path_dir = './test_images'
    file_list = os.listdir(path_dir)

    for file in file_list:
        img_name = path_dir + '/' + file
        img = imageio.imread(img_name)

        he_img = he(img)
        dhe_img = dhe(img)
        ying_img = Ying_2017_CAIP(img)

        he_img = cv2.cvtColor(he_img, cv2.COLOR_RGBA2BGR)
        dhe_img = cv2.cvtColor(dhe_img, cv2.COLOR_RGBA2BGR)
        ying_img = cv2.cvtColor(ying_img, cv2.COLOR_RGBA2BGR)

        cv2.imwrite('./result_images/he/he_' + file, he_img)
        cv2.imwrite('./result_images/dhe/dhe_' + file, dhe_img)
        cv2.imwrite('./result_images/ying/ying_' + file, ying_img)
示例#2
0
 def heFalse(self, input1, input2):
     e1 = pExp(input1)
     e2 = pExp(input2)
     self.assertFalse(he(e1, e2))
示例#3
0
 def heTrue(self, input1, input2):
     e1 = pExp(input1)
     e2 = pExp(input2)
     self.assertTrue(he(e1, e2))
示例#4
0
 def heFalse(self, input1, input2):
     e1 = pExp(input1)
     e2 = pExp(input2)
     self.assertFalse(he(e1, e2))
示例#5
0
 def heTrue(self, input1, input2):
     e1 = pExp(input1)
     e2 = pExp(input2)
     self.assertTrue(he(e1, e2))