Ask Your Question

khatri.kelash's profile - activity

2017-02-03 08:33:14 -0600 received badge  Enthusiast
2017-01-26 07:35:04 -0600 commented question extract rgb channel images in Android Java?

Sir can you provide the alternative for that? At least a guide will be very helpful, thank you.

2017-01-26 05:52:37 -0600 asked a question extract rgb channel images in Android Java?
 int mypixelColor;
for (int i = 0; i < pic.getHeight(); i++)
{
  for (int j = 0; j < pic.getWidth(); j++)
   {
     mypixelColor= pic.getPixel(i,j); 

    byte blue = (byte) ((mypixelColor & 0xff));
    byte green = (byte) (((mypixelColor >> 8) & 0xff));
    byte red = (byte) (((mypixelColor >> 16) & 0xff));

    bluepic.setPixel(i,j,Color.rgb(0,0,(int) blue+255));
    greenpic.setPixel(i,j,Color.rgb(0,(int) green+255,0));
    redpic.setPixel(i,j,Color.rgb((int) red+255,0,0));

  }
}

My purpose is extract bluepic channel,greenpic channel and redpic channel. there is a an error which i am unable to resolve/figure out. I think it is about loop termination. Anybody can help will be appreciated.

2017-01-24 08:46:22 -0600 commented answer how do I separate the channels of an RGB image and save each one, using the 2.4.9 version of OpenCV?

The code really helped me. I just want to ask about end results of channels, they are really red, green and blue channels images like in matlab or in grayscale(three same images but different ray level)? I am asking this because I get the color of channels iin grayscale instead of red, green and blue channel image respectively, thanks in advance.

2017-01-21 13:08:10 -0600 commented answer How to extract red color plane in OpenCV C++

Thank you Sir for reply, I managed to write the code, and convert the related 3 channels from matrix form to bitmap form but code is not working. The app just show dialog box [Unfortunaly app has stopped].

2017-01-21 11:27:51 -0600 commented answer How to read the pixels of the three channels at the same time?

Hello Sir, I tried your code in my Android application in Java using openCv library, it did not work, I just wanted to split the colorful bitmap image into its three different rgb channel images. It will be so great if you could help me in this situation.

2017-01-18 12:47:35 -0600 commented answer i want to split and show R B G pictures ,why does it not work?

Is it applicable for android programming in Java with openCv? if not then can you please suggest me the alternative for this code, Thank you.

2017-01-18 11:43:48 -0600 commented question Separate RGB channels in 3 Mat variables

Is it applicable for android programming in Java with openCv? if not then can you please suggest me the alternative for this code, Thank you.

2017-01-18 11:40:30 -0600 commented answer How to extract red color plane in OpenCV C++

Is it applicable for android programming in Java with openCv? if not then can you please suggest me the alternative for this code, Thank you.