예제 #1
0
파일: RGBandLab.cs 프로젝트: Grimhill/Image
        public static List <ArraysListDouble> RGB2Lab(Bitmap img)
        {
            List <ArraysListInt> ColorList = Helpers.GetPixels(img);
            var labResult = new List <ArraysListDouble>();

            var xyz = RGBandXYZ.RGB2XYZ(ColorList);

            labResult = XYZandLab.XYZ2Lab(xyz);

            return(labResult);
        }
예제 #2
0
파일: RGBandLab.cs 프로젝트: Grimhill/Image
        //R G B arrays in In the following order R G B
        public static List <ArraysListDouble> RGB2Lab(int[,] r, int[,] g, int[,] b)
        {
            List <ArraysListDouble> labResult = new List <ArraysListDouble>();

            if (r.Length != g.Length || r.Length != b.Length)
            {
                Console.WriteLine("R G B arrays size dismatch in rgb2lab operation -> rgb2lab(int[,] R, int[,] G, int[,] B) <-");
            }
            else
            {
                var xyz = RGBandXYZ.RGB2XYZ(r, g, b);
                labResult = XYZandLab.XYZ2Lab(xyz);
            }

            return(labResult);
        }
예제 #3
0
파일: RGBandLab.cs 프로젝트: Grimhill/Image
        //List with R G B arrays in In the following order R G B
        public static List <ArraysListDouble> RGB2Lab(List <ArraysListInt> rgbList)
        {
            List <ArraysListDouble> labResult = new List <ArraysListDouble>();

            if (rgbList[0].Color.Length != rgbList[1].Color.Length || rgbList[0].Color.Length != rgbList[2].Color.Length)
            {
                Console.WriteLine("list R G B arrays size dismatch in rgb2lab operation -> rgb2lab(List<arraysListInt> rgbList) <-");
            }
            else
            {
                var xyz = RGBandXYZ.RGB2XYZ(rgbList);
                labResult = XYZandLab.XYZ2Lab(xyz);
            }

            return(labResult);
        }