How to play a videocapture stream to CvCameraViewframe

asked 2014-07-03 08:43:29 -0600

I want to play a video on my camera view on android. The video needs some processing, masking the blackscreen. I tried this in cpp. How to do it in android? Please help

cv::Mat mask(videoframe.size(),CV_8U);
inRange(videoframe, 
           Scalar(0,0,0), 
           Scalar(0,0,0), 
           mask
           );
mask = 255 - mask;  // subtract the above black mask created from the image
 videoframe.copyTo(cameraframe,mask);//copy the video frame with mask(i.e. black part removed) onto the camera feed
 namedWindow("MixedFrame");
edit retag flag offensive close merge delete