Package de.mpi.rgblab.color

Examples of de.mpi.rgblab.color.ColorModel


 
  public static boolean test_z_score() {
    System.out.println("test_z_score");
    boolean b = true;
   
    ColorModel c1 = new ColorModel(1, 2, 3);
    ColorModel c2 = new ColorModel(4, 5, 6);
    ColorModel c3 = new ColorModel(7, 8, 19);
   
    ColorModel c = new ColorModel(1, 10, 5);
    Vector v = new Vector();
    v.add(c1);
    v.add(c2);
    v.add(c3);
   
View Full Code Here


      double n1 = in.nextDouble();
      double n2 = in.nextDouble();
      double n3 = in.nextDouble();
     
      //fails
      ColorModel rgb = ColorTransformer.xyz2rgb(ColorTransformer.lab2xyz(new ColorModel(n1, n2, n3, ColorType.LAB)));
      //ok
      //ColorModel rgb = ColorTransformer.lab2xyz(new ColorModel(n1, n2, n3, ColorType.LAB));
     
      //fails
      //ColorModel rgb = ColorTransformer.rgb2xyz(new ColorModel(n1, n2, n3, ColorType.RGB));
      System.out.println(rgb.getDimension_1());
      System.out.println(rgb.getDimension_2());
      System.out.println(rgb.getDimension_3());
     
      System.out.println("end");
   
    }
  }
View Full Code Here

    // copy the the vector to an array
    ColorModel[] my_rgbColor = new ColorModel[rgbColors.size()];
    rgbColors.copyInto(my_rgbColor);

    // transform to lab space
    ColorModel labColor[] = ColorTransformer.rgb2lab(my_rgbColor);

    // delete the old elements
    if (false == labColors.isEmpty())
      labColors.removeAllElements();
    // array to vector
View Full Code Here

    // copy the the vector to an array
    ColorModel[] my_labColor = new ColorModel[labColors.size()];
    labColors.copyInto(my_labColor);

    // transform to rgb space
    ColorModel rgbColor[] = ColorTransformer.lab2rgb(my_labColor);
   
    //check boundaries
    for (int i =0; i < rgbColor.length; i++) {
      rgbColor[i].setDimension_1(RGB.getCorrectR(rgbColor[i].getDimension_1()));
      rgbColor[i].setDimension_2(RGB.getCorrectG(rgbColor[i].getDimension_2()));
View Full Code Here

    double a = 0;

    int k = 0;
    int area = 0;

    ColorModel my_color;

    while (it.hasNext()) {

      my_color = (ColorModel) it.next();
      if (number_of_elements[k] > 0) {

        area += number_of_elements[k];

        l += my_color.getDimension_1() * number_of_elements[k];
        a += my_color.getDimension_2() * number_of_elements[k];
        b += my_color.getDimension_3() * number_of_elements[k];
      }
      k++;

    }

 
View Full Code Here

    double a = 0;

    int k = 0;
    int area = 0;

    ColorModel my_color;

    //for (int i =0; i < classNumbers; i++) {
    while (k < classNumbers) {

      my_color = (ColorModel) it.next();
      if (number_of_elements.get(k) > 0) {

        area += number_of_elements.get(k);

        l += my_color.getDimension_1() * number_of_elements.get(k);
        a += my_color.getDimension_2() * number_of_elements.get(k);
        b += my_color.getDimension_3() * number_of_elements.get(k);
      }
      k++;

    }

 
View Full Code Here

    float a = 0;

    int k = 0;
    int area = 0;

    ColorModel my_color;

    //for (int i =0; i < classNumbers; i++) {
    while (k < classNumbers) {

      my_color = (ColorModel) it.next();
      if (number_of_elements[k][point] > 0) {

        area += number_of_elements[k][point];

        l += my_color.getDimension_1() * number_of_elements[k][point];
        a += my_color.getDimension_2() * number_of_elements[k][point];
        b += my_color.getDimension_3() * number_of_elements[k][point];
      }
      k++;

    }

 
View Full Code Here

    double a = 0;

    int k = 0;
    int area = 0;

    ColorModel my_color;

    //while (it.hasNext()) {
    while (k < classNumbers) {

      my_color = (ColorModel) it.next();
      if (number_of_elements.get(k) > 0) {

        area += number_of_elements.get(k);

        l += my_color.getDimension_1() * number_of_elements.get(k);
        a += my_color.getDimension_2() * number_of_elements.get(k);
        b += my_color.getDimension_3() * number_of_elements.get(k);
      }
      k++;

    }

 
View Full Code Here

    number_surrounding_elements.clear();
    int[] sliceBoundaries = getSliceBoundaries(radius);

    Vector<ColorModel> labColors = new Vector<ColorModel>();
    VisUtil.rgbToLabColors(rgbColors, labColors);
    ColorModel currentPointColor;

    // int my_count1 = 0;
    // tmp variables
    // Iterator it_map_matrix1 = coordinates.iterator();
    // Iterator it_map_matrix2;
View Full Code Here

    // MemoryUtil.printMemory("start");
    initMinSaliency();
    initMaxSaliency();
    saliency.clear();

    ColorModel currentPointColor;

    int l;
    float z;

    Vector<Integer> number_of_elements;
View Full Code Here

TOP

Related Classes of de.mpi.rgblab.color.ColorModel

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.