Ask Your Question

blackStudent's profile - activity

2015-08-25 00:24:14 -0500 commented question [android with opencv ] RGBA to signal channel

I found my bug is signal change to multi-channel, so I add this command
Imgproc.cvtColor(gchannel, gchannel, Imgproc.COLOR_GRAY2RGBA); after the command Core.extractChannel(sub, sub, 1); then is work, but I don't know is it correct answer??

2015-08-25 00:24:13 -0500 asked a question [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, r.tl(), r.br(), yellow, 3);
      Mat sub = mRgba.submat(r);
      Mat gchannel = new Mat();
      Core.extractChannel(sub, sub, 1);
      sub.copyTo(mRgba.submat(r));
      return mRgba;

but is doesn't work . Could anybody help me

2015-08-25 00:24:13 -0500 asked a question [Android with Opencv] I want to split RGBA channel to be single channel (green channel) with ROI

I want to split RGBA channel to be single channel (green channel) ,and my code is below:

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

but is doesn't work. Could anyone help me ??