Package collage.image

Examples of collage.image.FeatureSet


        List<FeatureSet> candidates = sic.convertToFeatures(cellDim);
       
        List<Cell> srcCells = sa.perform(img, cellDim, candidates);

        NearestNeighbour nn = new NearestNeighbour();
        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));
View Full Code Here


        yRemaining -= (hStep-1);
      }
      xRemaining -= (wStep-1);
    }
   
    return new FeatureSet(name, colorSet);
  }
View Full Code Here

 
  public FeatureSet find(FeatureSet srcFeature, List<FeatureSet> candidates) {
       
    double minDist = Double.POSITIVE_INFINITY;
    double curDist;
    FeatureSet bestCand = null;
   
   
    for (FeatureSet cand : candidates) {
      curDist = this.MSE(srcFeature, cand);
      if (curDist < minDist) {
View Full Code Here

    int hStep = (int)Math.ceil((double)(img.getHeight())/h);
   
    int xRemaining;
    int yRemaining;
    Rectangle rect;
    FeatureSet fs;
    int img_w = img.getWidth();
    int img_h = img.getHeight();
   
    xRemaining = img.getWidth()-1;
    for (int x = 0; x < img.getWidth(); x += wStep) {
View Full Code Here

  private List<Cell> getCells(BufferedImage img, List<Rectangle> rectangles,
      Dimension cellDim) {
   
    List<Cell> cells = new ArrayList<Cell>();
    FeatureCollector fc = new FeatureCollector();
    FeatureSet fs;
   
    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);
View Full Code Here

TOP

Related Classes of collage.image.FeatureSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.