I\'m loading a set of test images via OpenCV (in Python) which are 128x128 in size, reshape them into vectors (1, 128x128) and put them all together in a matrix to calculate
I think the problem is with the size of
np.mean(matrix_test, axis=0)
Its size is (128x128,) and not (1, 128x128). Thus the code below should work
mean, eigenvectors = cv.PCACompute(matrix_test, np.mean(matrix_test, axis=0).reshape(1,-1))