Python Eigen面临[暂停]

我正在做一个使用特征面识别面部的程序 . 我必须列出代码的所有内容 . 但有些事情我无法弄清楚 .

def createDataMatrix(images):
    print("Creating data matrix", end=" ... ")

    numImages = len(images)
    sz = images[0].shape #retorna a dimensão do array
    data = np.zeros((numImages, sz[0] * sz[1] * sz[2]), dtype=np.float32) 

    for i in xrange(0, numImages): #lista de nr inteiros
        image = images[i].flatten()
        data[i, :] = image

    print("DONE")
    return data

回答(0)