An application of bagging to tree-based image classification