July 2018
Beginner to intermediate
406 pages
9h 55m
English
For example, let's say you want to add a new feature (or even a set of features). As we saw in Chapter 12, Computer Vision, this is easy to do by changing the feature computation code. However, this would imply recomputing all the features again, which is wasteful, particularly if you want to test new features and techniques quickly.
We now add a set of features, that is, another type of texture feature called linear binary patterns. This is implemented in mahotas; we just need to call a function, but we wrap it in TaskGenerator:
@TaskGenerator def compute_lbp(fname): from mahotas.features import lbp imc = mh.imread(fname) im = mh.colors.rgb2grey(imc) # The parameters 'radius' and 'points' are set to typical values ...
Read now
Unlock full access