213214215216217218219220221222223
FeatureSet nearest; List<Cell> newCells = new ArrayList<Cell>(); for (Cell srcCell : srcCells) { nearest = nn.find(srcCell.getFeatures(), candidates); newCells.add(new Cell(srcCell.getBounds(),nearest)); } //CollageImage ci = new CollageImage(newCells,img); frame.getContentPane().removeAll();
109110111112113114115116117118
for (Rectangle rect : rectangles) { //System.out.format("%d %d %d %d\n", rect.x, rect.y, rect.width, rect.height); fs = fc.gather(img.getSubimage(rect.x, rect.y, rect.width, rect.height), "",cellDim); cells.add(new Cell(rect,fs)); } return cells; }