Back to project page opencv-android-starter-project.
The source code is released under:
MIT License
If you think the Android project opencv-android-starter-project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.computervision; // www . j a v a 2 s . c om import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame; import org.opencv.core.Mat; public class ProcessImageFragment extends CameraViewFragment { /** * To process the camera frame use the inputFrame variable * in this method, call inputFrame.rgba() to get * a colour frame. */ @Override public Mat onCameraFrame(CvCameraViewFrame inputFrame) { // Get the Colour Frame Mat myFrame = inputFrame.rgba(); /** * Place your image processing code here */ // Return the processed frame return myFrame; } }