// build pipeline
Sequence seq = new Sequence();
seq.add(new RgbSubSample(nReducedWidth, nReducedHeight));
seq.add(new RgbAvgGray());
seq.add(new Gray8HistEq());
seq.add(new Gray8HorizVertContrast(5, 2, -8, 3));
seq.add(new Gray16Threshold(20));
seq.push(rgb);
Gray8ConnComp gcc = new Gray8ConnComp();
Image imThresh = seq.getFront();
Gray8Rgb g2r = new Gray8Rgb();