📜  将 numpy 数组转换为 HSV cv - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:23.783000             🧑  作者: Mango

代码示例2
def import_images(path_list):
    path_len = len(path_list)
    images = numpy.zeros((path_len, 224, 224, 3), dtype = numpy.float64)

    for pos in range(path_len):
        testimg = cv2.imread(path_list[pos])

        if(testimg is not None):
            testimg = cv2.cvtColor(testimg, cv2.COLOR_BGR2RGB)
            testimg = cv2.resize(testimg, (224, 224))
            images[pos, :, :, :] = testimg
    return images