Android Open Source - opencv-android-starter-project Process Image Fragment






From Project

Back to project page opencv-android-starter-project.

License

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.

Java Source Code

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;
  }

}




Java Source Code List

com.computervision.CameraViewFragment.java
com.computervision.CameraView.java
com.computervision.ComputerVision.java
com.computervision.ProcessImageFragment.java