카메라로 촬영한 이미지를 픽셀카운트 하려고 소스를 구했는데요

 

이걸 메소드화시켜서 프로세싱하려면 어떻게해야 하나요 기초가 너무 없어서

 

쉽게 설명해주실분 없나요? C언어 기초정도밖에 지식이없어서 자바에서 적용시키기가 쉽지가 않네요.

 

int count = 0;//Counter to count pixels
         Bitmap b = new Bitmap("123.jpg");//Getting the image.
         Color c;

         //Looping over all pixels
         for (int i = 0; i < b.Width; i++)
         {
            for (int j = 0; j < b.Height; j++)
            {
               c = b.GetPixel(i, j);//Get the current pixel.

               if (c.R == 153 && c.G == 184 && c.B == 226)//Checking pixel
               {
                  count++;//increase counter
                  //Do what ever you want, you have got the pixel that have
                  // R = 153 AND G = 184 AND B = 226
               }
            }
         }