handling of grayscales in Matlab failed, so the work has been moved to configdir.py