Package JDescriptors.fr.lip6.color

Examples of JDescriptors.fr.lip6.color.ColorVQDescriptorCreator


    int s = Integer.parseInt(args[5]);
    int r = Integer.parseInt(args[6]);
    int maxHeight = (args.length >= 8) ? Integer.parseInt(args[7]) : -1;
    boolean onlyTop = (Integer.parseInt(args[8]) == 1);
   
    ColorVQDescriptorCreator c = ColorVQDescriptorCreator.getInstance();
    //System.out.println(" s = " + s + " ; r = " + s + " ; cut = " + cut);
   
    //Descriptor creator
    HoneycombDetector detector = new HoneycombDetector(s, r);
    c.setDetector(detector);
    IHSColorQuantizer q = new IHSColorQuantizer(I, H, S);
    c.setQuantizer(q);
    c.setNormalize(false);
   
    File src = new File(srcDir);
    if(!src.exists() || !src.isDirectory())
    {
      System.out.println(srcDir+" : No such directory !");
      return;
    }
   
    String[] files2 = src.list();
    if(files2 == null)
    {
      System.out.println("No files in "+srcDir);
      return;
    }
    //(new File(dstDir)).mkdir();
    for (String f2 : files2) {
    System.out.println("f2 = " + dstDir+f2);

    (new File(dstDir+f2)).mkdir();
    for(String f : new File(srcDir+"\\"+f2).list())
    {
      if (!(f.endsWith(".png"))){
        continue;
      }
      try
      {
        //if (!(new File(dstDir+f2+"\\"+f.substring(0, f.indexOf('.'))+".xgz").exists()) && !f.equals("280.png") && !f.equals("281.png") ){
          //System.out.println(f);
        System.out.println("lecture de " + srcDir+"/"+f2+"/"+f);
        if (!(new File(dstDir+f2+"\\"+f.substring(0, f.indexOf('.'))+".xgz").exists())) {
        ArrayList<ColorVQFloatDescriptor> list = c.createDescriptors(srcDir+"/"+f2+"/"+f, maxHeight, onlyTop);
        XMLWriter.writeXMLFile(dstDir+"/"+f2+"/"+f.substring(0, f.indexOf('.')), list, true);
        System.out.println(f+" descriptor written : taille = " + list.size());
        }
      }
      catch(Exception ioe)
View Full Code Here


    {
      System.out.println("usage : TestXMLWriter <image> <output>");
      return;
    }
   
    ColorVQDescriptorCreator c = ColorVQDescriptorCreator.getInstance();
   
    //honeycomb patches
    HoneycombDetector detector = new HoneycombDetector(12, 12);
    c.setDetector(detector);
   
    int x = 8, y = 6, z = 3;
//    RGBColorQuantizer q = new RGBColorQuantizer(x, y, z);
    IHSColorQuantizer q = new IHSColorQuantizer(x, y, z);
    c.setQuantizer(q);
   
    c.setNormalize(false);
   
    ArrayList<ColorVQFloatDescriptor> d = c.createDescriptors(args[0]);

    XMLWriter.writeXMLFile(args[1], d, true);
   
  }
View Full Code Here

   * @param onlyTop
   */
  public static void run(BufferedImage img, ArrayList<Descriptor> desc, int I, int H, int S, int s, int r, int maxHeight, boolean onlyTop) {
    double temp = 0;
   
    ColorVQDescriptorCreator c = ColorVQDescriptorCreator.getInstance();
   
    //Descriptor creator
    HoneycombDetector detector = new HoneycombDetector(s, r);
    c.setDetector(detector);
    IHSColorQuantizer q = new IHSColorQuantizer(I, H, S);
    c.setQuantizer(q);
    c.setNormalize(false);
    try{
    desc.addAll((ArrayList<Descriptor>) c.createDescriptors(img, maxHeight, onlyTop))
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

    HoneycombDetector detector = new HoneycombDetector(12, 12);
    c.setDetector(detector);
   
    int x = 10, y = 6, z = 4;
//    RGBColorQuantizer q =new RGBColorQuantizer(x, y, z);
    IHSColorQuantizer q = new IHSColorQuantizer(x, y, z);
    c.setQuantizer(q);
   
    c.setNormalize(true);
   
    ArrayList<ColorVQFloatDescriptor> d = c.createDescriptors(args[0]);
View Full Code Here

    //System.out.println(" s = " + s + " ; r = " + s + " ; cut = " + cut);
   
    //Descriptor creator
    HoneycombDetector detector = new HoneycombDetector(s, r);
    c.setDetector(detector);
    IHSColorQuantizer q = new IHSColorQuantizer(I, H, S);
    c.setQuantizer(q);
    c.setNormalize(false);
   
    File src = new File(srcDir);
    if(!src.exists() || !src.isDirectory())
View Full Code Here

    HoneycombDetector detector = new HoneycombDetector(12, 12);
    c.setDetector(detector);
   
    int x = 8, y = 6, z = 3;
//    RGBColorQuantizer q = new RGBColorQuantizer(x, y, z);
    IHSColorQuantizer q = new IHSColorQuantizer(x, y, z);
    c.setQuantizer(q);
   
    c.setNormalize(false);
   
    ArrayList<ColorVQFloatDescriptor> d = c.createDescriptors(args[0]);
View Full Code Here

    ColorVQDescriptorCreator c = ColorVQDescriptorCreator.getInstance();
   
    //Descriptor creator
    HoneycombDetector detector = new HoneycombDetector(s, r);
    c.setDetector(detector);
    IHSColorQuantizer q = new IHSColorQuantizer(I, H, S);
    c.setQuantizer(q);
    c.setNormalize(false);
    try{
    desc.addAll((ArrayList<Descriptor>) c.createDescriptors(img, maxHeight, onlyTop))
    }
View Full Code Here

    String descOut = args[1];
   
   
    GaborDescriptorCreator creator = new GaborDescriptorCreator();
   
    Detector detector = new HoneycombDetector(6, 9);
    creator.setDetector(detector);
   
    long tim = System.currentTimeMillis();
    ArrayList<GaborDescriptor> listOfDesc = creator.createDescriptors(im);
    System.out.println("time : "+(System.currentTimeMillis()-tim));
View Full Code Here

      System.out.println("low level counting : "+counting);
   
    int i = 0;
    //creation extracteur de gaborettes
    GaborDescriptorCreator creator = new GaborDescriptorCreator();
    Detector detector = new HoneycombDetector(spacing, scaling);
    creator.setDetector(detector);
    creator.setOrientation(orientation);
    creator.setCounting(counting);
   
    //processing all files
View Full Code Here

      System.out.println("low level counting : "+counting);
   
    int i = 0;
    //creation extracteur de gaborettes
    MacroGaborDescriptorCreator creator = new MacroGaborDescriptorCreator();
    Detector detector = new HoneycombDetector(spacing, scaling);
    creator.setDetector(detector);
    creator.setOrientation(orientation);
    creator.setCounting(counting);
   
    //processing all files
View Full Code Here

TOP

Related Classes of JDescriptors.fr.lip6.color.ColorVQDescriptorCreator

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.