This format (pgm) is unknown to imread

51 views Asked by At
#-*- coding:utf-8 -*-

from os import walk,path
import numpy as np
import mahotas as mh
from sklearn.cross_validation import train_test_split
from sklearn.cross_validation import cross_val_score
from sklearn.preprocessing import scale
from sklearn.decomposition import PCA
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
mh.imread('1.pgm')

Unable to read a PGM image in mahotas,the error infomation is 'RuntimeError: This format (pgm) is unknown to imread'

0

There are 0 answers