Examples of FeatureSet


Examples of collage.image.FeatureSet

  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

Examples of com.hp.hpl.jena.sdb.store.FeatureSet

    public StoreDesc(LayoutType layout, DatabaseType dbType, FeatureSet featureSet)
    {
        this.layout = layout ;
        this.dbType = dbType ;
        if ( featureSet == null )
            featureSet = new FeatureSet() ;
        this.featureSet = featureSet ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.store.FeatureSet

        String layoutName = GraphUtils.getStringValue(root, AssemblerVocab.pLayout) ;
        String dbType = chooseDBType(root, sdbConnDesc) ;
       
        // Features
        List<Resource> x = GraphUtils.multiValueResource(root, AssemblerVocab.featureProperty) ;
        FeatureSet fSet = new FeatureSet() ;
        for ( Resource r : x )
        {
            String n = GraphUtils.getStringValue(r, AssemblerVocab.featureNameProperty) ;
            String v = GraphUtils.getStringValue(r, AssemblerVocab.featureValueProperty) ;
            Feature f = new Feature(new Feature.Name(n), v) ;
            fSet.addFeature(f) ;
        }
       
        StoreDesc storeDesc = new StoreDesc(layoutName, dbType, fSet) ;
        storeDesc.connDesc = sdbConnDesc ;
View Full Code Here

Examples of com.hp.hpl.jena.sdb.store.FeatureSet

    public StoreDesc(LayoutType layout, DatabaseType dbType, FeatureSet featureSet)
    {
        this.layout = layout ;
        this.dbType = dbType ;
        if ( featureSet == null )
            featureSet = new FeatureSet() ;
        this.featureSet = featureSet ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sdb.store.FeatureSet

        String layoutName = GraphUtils.getStringValue(root, AssemblerVocab.pLayout) ;
        String dbType = chooseDBType(root, sdbConnDesc) ;
       
        // Features
        List<Resource> x = GraphUtils.multiValueResource(root, AssemblerVocab.featureProperty) ;
        FeatureSet fSet = new FeatureSet() ;
        for ( Resource r : x )
        {
            String n = GraphUtils.getStringValue(r, AssemblerVocab.featureNameProperty) ;
            String v = GraphUtils.getStringValue(r, AssemblerVocab.featureValueProperty) ;
            Feature f = new Feature(new Feature.Name(n), v) ;
            fSet.addFeature(f) ;
        }
       
        StoreDesc storeDesc = new StoreDesc(layoutName, dbType, fSet) ;
        storeDesc.connDesc = sdbConnDesc ;
View Full Code Here

Examples of com.sun.speech.freetts.FeatureSet

      System.err.println
    ("FreeTTS: unit database failed to find entry for: " +
     diphoneName);
  }
  Item unit = unitRelation.appendItem();
  FeatureSet unitFeatureSet = unit.getFeatures();

  unitFeatureSet.setString("name", diphoneName);
  unitFeatureSet.setInt("target_end", targetEnd);
  unitFeatureSet.setObject("unit", new DiphoneUnit(diphone, unitPart));
  // unitFeatureSet.setInt("unit_part", unitPart);
  return unit;
    }
View Full Code Here

Examples of com.sun.speech.freetts.FeatureSet

  }
  lpcResult.resizeResiduals(samplesSize);
 
  for (Item unitItem = unitRelation.getHead(); unitItem != null;
       unitItem = unitItem.getNext()) {
      FeatureSet featureSet = unitItem.getFeatures();

      String unitName = featureSet.getString("name");
      targetEnd = featureSet.getInt("target_end");
      Unit unit = (Unit) featureSet.getObject("unit");
      int unitSize = unit.getSize();

      uIndex = 0;
      m = (float)unitSize/(float)(targetEnd - targetStart);
      numberFrames = lpcResult.getNumberOfFrames();
View Full Code Here

Examples of com.sun.speech.freetts.FeatureSet

     * @param segment the Segment Item
     *
     * @return the <code>end</code> feature of the Segment
     */
    public static float getSegmentEnd(Item segment) {
  FeatureSet segmentFeatureSet = segment.getFeatures();
  return segmentFeatureSet.getFloat("end");
    }
View Full Code Here

Examples of com.sun.speech.freetts.FeatureSet

  IntLinkedList timesList = new IntLinkedList();
 
  // first pass to count how many pitch marks will be required
  for (Item targetItem = targetRelation.getHead();
       targetItem != null; targetItem = targetItem.getNext()) {
      FeatureSet featureSet = targetItem.getFeatures();
      pos = featureSet.getFloat("pos");
      f0 = featureSet.getFloat("f0");
        //System.err.println("Target pos="+pos+", f0="+f0);
      if (time == pos) {
            lf0 = f0;
    continue;
      }
View Full Code Here

Examples of com.sun.speech.freetts.FeatureSet

    // units to concatenate.
  Relation unitRelation = utterance.createRelation(Relation.UNIT);

  for (Item s = segs.getHead(); s != null; s = s.getNext()) {
      Item unit = unitRelation.appendItem();
      FeatureSet unitFeatureSet = unit.getFeatures();
      int unitEntry = s.getFeatures().getInt("selected_unit");

        // The item name is the segment name
      unitFeatureSet.setString("name", s.getFeatures().getString("name"));

      int unitStart;
      int unitEnd;
      String clunitName = s.getFeatures().getString("clunit_name");

      if (s.getFeatures().isPresent("unit_this_move")) {
    unitStart = s.getFeatures().getInt("unit_this_move");
      } else {
    unitStart = clunitDB.getStart(unitEntry);
      }

      if (s.getNext() != null &&
        s.getNext().getFeatures().isPresent("unit_prev_move")) {
    unitEnd = s.getNext().getFeatures().getInt("unit_prev_move");
      } else {
    unitEnd = clunitDB.getEnd(unitEntry);
      }

      unitFeatureSet.setInt("unit_entry", unitEntry);
      ClusterUnit clunit = new ClusterUnit(clunitDB,
        clunitName, unitStart, unitEnd);
      unitFeatureSet.setObject("unit", clunit);
      if (true) {
    unitFeatureSet.setInt("unit_start", clunit.getStart());
    unitFeatureSet.setInt("unit_end", clunit.getEnd());
        unitFeatureSet.setInt("instance", unitEntry - clunitDB.getUnitIndex(clunitName, 0));
      } // add the rest of these things for debugging.

      if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine(" sr " + clunitDB.getSampleInfo().getSampleRate() + " " +
        s.getFeatures().getFloat("end") + " " +
        (int) (s.getFeatures().getFloat("end") *
         clunitDB.getSampleInfo().getSampleRate()));
      }
      unitFeatureSet.setInt("target_end",
    (int) (s.getFeatures().getFloat("end")
           * clunitDB.getSampleInfo().getSampleRate()));
 
      // Associate debug info about unit origin if available:
        UnitOriginInfo unitOrigin = clunitDB.getUnitOriginInfo(unitEntry);
      if (unitOrigin != null) {
          unitFeatureSet.setString("origin", unitOrigin.originFile);
          unitFeatureSet.setFloat("origin_start", unitOrigin.originStart);
            unitFeatureSet.setFloat("origin_end", unitOrigin.originEnd);
        }
       
  }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.