Package de.mpi.rgblab.color

Examples of de.mpi.rgblab.color.ColorModel


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


 
  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

            }
        }
  }
 
  private void updateModelColor(float h,float c, float l){
    ColorModel lchColor = new ColorModel(l,c,h,ColorType.LCH_uv);
    Color color = ColorModel.getColor(ColorTransformer.lch_uv2rgb(lchColor));
   
    colorRect.setColor(color);
    colorRect.repaint();
    System.out.println(color);
View Full Code Here

    System.out.println(color);
    getColorSelectionModel().setSelectedColor(color);
   
  }
  private void updateHCL(float h,float c, float l){
    ColorModel lch = new ColorModel(l,c,h,ColorType.LCH_uv);
    if (!isAdjusting){
      isAdjusting = true;
      Color color = ColorModel.getColor(ColorTransformer.lch_uv2rgb(lch));
     
       getColorSelectionModel().setSelectedColor( color );
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

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

    Vector<ColorModel> labColors = new Vector<ColorModel>();
    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

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

    Vector<ColorModel> labColors = new Vector<ColorModel>();
    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

    System.out.println("start");
    long currentTimeInSeconds = System.currentTimeMillis();

    Vector<ColorModel> rgbColors = ColorReader
        .getColorsAsColorModel("colors.dat");
    ColorModel cm = new ColorModel(50, 50, 50, ColorType.LAB);

    double z = 0;
    double y = 0;
    //for (int i = 0; i < 100000; i++)
      z = Numeric.eucl_Distance(cm, rgbColors);
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

            }
        }
  }
 
  private void updateModelColor(float h,float c, float l){
    ColorModel lchColor = new ColorModel(l,c,h,ColorType.LCH_uv);
    Color color = ColorModel.getColor(ColorTransformer.lch_uv2rgb(lchColor));
   
    colorRect.setColor(color);
    colorRect.repaint();
    System.out.println(color);
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.