java.lang.NullPointerException: Attempt to invoke virtual method 'org.opencv.core.Mat org.opencv.core.Mat.submat(org.opencv.core.Rect)' on a null object reference

Stack Overflow | Shulz | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Android Opencv Submat null object reference

    Stack Overflow | 5 months ago | Shulz
    java.lang.NullPointerException: Attempt to invoke virtual method 'org.opencv.core.Mat org.opencv.core.Mat.submat(org.opencv.core.Rect)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'org.opencv.core.Mat org.opencv.core.Mat.submat(org.opencv.core.Rect)' on a null object reference

      at com.example.backup.contour_image.MainActivity.onTouch()
    2. com.example.backup
      MainActivity.onTouch
      1. com.example.backup.contour_image.MainActivity.onTouch(MainActivity.java:103)
      1 frame
    3. Android Platform
      ViewGroup.dispatchTouchEvent
      1. android.view.View.dispatchTouchEvent(View.java:9406)
      2. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)
      3. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)
      4. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)
      5. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)
      6. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)
      7. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)
      8. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)
      9. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)
      9 frames