Java RGB Color Convert To rgb2gray(int r, int g, int b)

Here you can find the source of rgb2gray(int r, int g, int b)

Description

rgbgray

License

Open Source License

Declaration

public static double rgb2gray(int r, int g, int b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double rgb2gray(int r, int g, int b) {
        return 0.3 * r + 0.59 * g + 0.11 * b;
    }/*w ww.java  2  s .  c  o m*/
}

Related

  1. convertRGBtoHSV(float[] rgb, float[] hsv)
  2. convertRGBtoYIQ(float[] rgb, float[] yiq)
  3. rgb24FloatArray(float[] array, int rgb24)
  4. rgb2arr(final int color, final int[] argbarr)
  5. rgb2bilevel(int[] rgb)
  6. rgb2grayscale(int[] rgb, int imageWidth, int imageHeight)
  7. rgb2grayscaleA(int[] rgb)
  8. rgb2Hex(int rgb)
  9. rgb2hex(int[] rgb)