Ask Your Question

Revision history [back]

[android with opencv ] RGBA to signal channel

I want to extract green channel from input.rgba(), my code are below:

enter code here
      mRgba = inputFrame.rgba();
      Rect r = new Rect(150,50,200,200); 
      Core.rectangle(mRgba,,, yellow, 3);
      Mat sub = mRgba.submat(r);
      Mat gchannel = new Mat();
      Core.extractChannel(sub, sub, 1);
      return mRgba;

but is doesn't work . Could anybody help me