File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 66import numpy as np
77import mahotas as mh
88from glob import glob
9- from features import texture , color_histogram
9+ from features import texture , chist
1010from matplotlib import pyplot as plt
1111from sklearn .preprocessing import StandardScaler
1212from scipy .spatial import distance
2929 imc = mh .imread (fname )
3030 imc = imc [200 :- 200 ,200 :- 200 ]
3131 haralicks .append (texture (mh .colors .rgb2grey (imc )))
32- chists .append (color_histogram (imc ))
32+ chists .append (chist (imc ))
3333
3434haralicks = np .array (haralicks )
3535chists = np .array (chists )
Original file line number Diff line number Diff line change 99import numpy as np
1010from glob import glob
1111
12- from features import texture , color_histogram
12+ from features import texture , chist
1313from sklearn .linear_model import LogisticRegression
1414from sklearn .pipeline import Pipeline
1515from sklearn .preprocessing import StandardScaler
3232for fname in sorted (images ):
3333 imc = mh .imread (fname )
3434 haralicks .append (texture (mh .colors .rgb2grey (imc )))
35- chists .append (color_histogram (imc ))
35+ chists .append (chist (imc ))
3636
3737 # Files are named like building00.jpg, scene23.jpg...
3838 labels .append (fname [:- len ('xx.jpg' )])
You can’t perform that action at this time.
0 commit comments