I'm working with kinect, and just started with python.
I know how to read an image and save as a matrix in python.
But how can I manage to read all images in a directory and save as matrix files (.mat files) in another directory?
Could you give a brief short example?
Thanks,
Using scikit-image, you can utilise the ImageCollection object:
from skimage import io
images = io.imread_collection('/path/to/images/*.jpg')
for (image, fn) in zip(images, images.files):
np.savetxt(fn + '.txt', image)